59 questions
0 votes
0 answers
34 views
Are inline fragments recommended for GraphQL for native mobile app consumption?
New to GraphQL. Working on designing integration for native mobile app (kotlin/swift). Planning to use Apollo GraphQL Architecture: native app(app) -> graphQL server (server) -> REST endpoint (...
1 vote
0 answers
16 views
How can I integrate a GraphQLInputObject into a schema loaded dynamically using JavaScript?
async function _loadSchema() { const typeDefs = await loadSchema(path.join(__dirname, '../graphql/typedefs/*.graphql'), { loaders: [ new GraphQLFileLoader() ] }); ...
1 vote
0 answers
237 views
How to decide merge order schemas graphql codegen
I'm trying to merge two separate graphql schemas one which is provided by my CMS endpoint and a local schema for additional typehinting (my CMS schema isn't precise enough). Is there a way to ...
0 votes
1 answer
131 views
How to declare Array Of Objects in TypeORM Graphql Schema?
I am working with 2 Postgres Models - users and posts, where each user can have multiple posts (One to Many Relation). Here I need to make a user profile function to access data of single user along ...
2 votes
0 answers
1k views
Python parse a graphqls file
Is there a lib/tool for Python to automatically parse a graphqls file? If not, what is a good way to parse the file? I have a Python project that is part of a larger Java project that contains a ....
1 vote
0 answers
129 views
How to query nested field of object Y nested inside paginated objects X regarding the X objects?
I want to have a GraphQL schema like the following: scalar Timestamp input StatsArgs{ start: Timestamp! end: Timestamp } input PaginationArgs{ page: Int! limit: Int! } type Station{ ...
0 votes
0 answers
311 views
What is the best practice for a GraphQL mutation in an AddToCollection scenario?
Say I have a book-sharing app, and given say a user with a collection of favorite books, when adding a favorite book is the most common best practice that we just use editUser mutation and update ...
0 votes
2 answers
1k views
How to maintain client-side GraphQL files synched with the one in server-side?
I'm new to GraphQL so please forgive any if this is a silly question. I want to organize GraphQL files(schema and query/mutation files) in client side, which has to be aligned with the GraphQL files ...
0 votes
1 answer
572 views
Gatsby v5 and GraphQL: 'Error: Schema must contain uniquely named types but contains multiple types named "File".'
I'm developing my website using Gatsby v5 and I'm currently struggling with a GraphQL issue. Problem I use a static GraphQL query to pull the openGraphImageUrl from some GitHub repositories and ...
1 vote
2 answers
1k views
GraphQL Mutation how to make fields optional to update fields only by selection and generate schema
I have a graphql mutation defined as follows type Mutation { updateParts( partId: String! parts: PartRequest! ): UpdatePartsResponse! } input PartRequest { name: String! ...
2 votes
0 answers
164 views
GraphQL extract possible queries from a schema
I have a graphql schema that i'm parsing type User { id: ID! name: String! email: String! age: Int posts: [Post!]! } type Post { id: ID! title: String! body: String! author: User! ...
3 votes
0 answers
1k views
tried to redefine existing error around graphql
I have 2 project(graphql client) with schema.graphqls each fro different graphql endpoints, and have some same definitions. Project A --schema.graphqls --type Order... type Product... Project B --...
0 votes
1 answer
499 views
Can't figure out how Sangria does conversion from GraphQL type to Scala type
Context I have setup like so: case class Foo( option_enum_vector_field: Option[Vector[Bar]] // Bar is complicated object which can't be easily expressed with sangria default scalars, but can be ...
0 votes
1 answer
568 views
Unable to return an interface or a union type from a field in the schema
I was reading the graphQL doc and I found an issue while working with Inline Fragments and Interfaces They mention in the document that we can also return an interface or union type in the schema, but ...
1 vote
0 answers
334 views
Dynamically modify GraphQL schema and see updated schema with GraphiQL
I have a GraphQL schema: enum CustomType { Foo Bar } But I need to add enum items from my database. For that, I have made a Visitor that modify the schema model during runtime: @Configuration(...