We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When supplying a default value for a required field, it is not used and instead throws a validation error.
const { graphql, buildSchema } = require('graphql') const schema = buildSchema(` type Query { hello(x: Int! = 42): Int } `) const root = { hello: (args) => args.x } graphql(schema, '{ hello }', root).then(console.log)
Produces: GraphQLError: Field "hello" argument "x" of type "Int!" is required but not provided.
GraphQLError: Field "hello" argument "x" of type "Int!" is required but not provided.
The text was updated successfully, but these errors were encountered:
@benwaffle Should be fixed in #1274 Can you please try it on 14.0.0-rc.2?
14.0.0-rc.2
Sorry, something went wrong.
it works on 14.0.0-rc.2, thanks
No branches or pull requests
When supplying a default value for a required field, it is not used and instead throws a validation error.
Produces:
GraphQLError: Field "hello" argument "x" of type "Int!" is required but not provided.
The text was updated successfully, but these errors were encountered: