Replies: 1 comment 3 replies
-
No you cant That SDL
is not a field - its telling the schema the name of the root query type eg
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Can you have have arguments in the root schema object in your schema definition? My Schema is as follows
schema {
query(page: int, size: int): Query
}
type Query {
books: [Book]!
bookAndRelatedBooks(id: ID): BookAndRelatedBooks!
findByName(name: String): [Book]!
}
...
Every query is paginated so I'd like to pass in arguments for pagination to the root query object, instead of having those arguments on each field in Query
The error is with the GraphQL Schema:
Failed to instantiate [graphql.GraphQL]: Factory method 'graphQL' threw exception; nested exception is SchemaProblem{errors=[InvalidSyntaxError{ message=Invalid Syntax ,locations=[SourceLocation{line=2, column=7}]}]}
Beta Was this translation helpful? Give feedback.
All reactions