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 using a simple input, setting the same key twice will give an error: There can be only one input field named "y".
There can be only one input field named "y".
When using an input in an input, that second level input will not give the same error.
var { graphql, buildSchema } = require('graphql'); // Construct a schema, using GraphQL schema language var schema = buildSchema(` type Query { deepInput(input: InputA): String, singleInput(input: InputB): String } input InputA { x: InputB } input InputB { y: String } `); var root = { singleInput: () => { return 'Hello single world!'; }, deepInput: () => { return 'Hello deep world!'; }, }; // This will five the error that `y` is defined twice graphql(schema, '{ singleInput(input: { y: "foo", y: "bar" }) }', root).then((response) => { console.log(response); }, (error) => { console.log(error) }); // But this won't graphql(schema, '{ deepInput(input: { x: { y: "foo", y: "bar" } }) }', root).then((response) => { console.log(response); }, (error) => { console.log(error) });
The text was updated successfully, but these errors were encountered:
Duplicate fields in deep inputs not validated properly (#1791) (#1792)
a001adb
@jbblanchet Thanks for reporting 👍 Already fixed by @Cito in #1792 🚀 and will be included in the next release.
Sorry, something went wrong.
No branches or pull requests
When using a simple input, setting the same key twice will give an error:
There can be only one input field named "y".
When using an input in an input, that second level input will not give the same error.
The text was updated successfully, but these errors were encountered: