You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Able to use non input type as input type when wrapped in GraphQLList #2656
Describe the bug
The issue occurs when using GraphQLArgument builder with type as GraphQLList(an instance of GraphQLInputType) and wraps a non-input type like GraphQLObjectType.
Was also able to build a schema as shown in the following code.
Thanks for report - yup I can see this can be a bug because a list is both an input type and output type and its not until you put it into a context (argument or field) that you know if its incorrect or not.
Type references could also create this problem.
We could write an extra schema validation rule to catch this - that is once the schema is finalised - we would unwrap every argument / field and make sure the wrapped types are valid for the context.
Activity
bbakerman commentedon Dec 22, 2021
Thanks for report - yup I can see this can be a bug because a list is both an input type and output type and its not until you put it into a context (argument or field) that you know if its incorrect or not.
Type references could also create this problem.
We could write an extra schema validation rule to catch this - that is once the schema is finalised - we would unwrap every argument / field and make sure the wrapped types are valid for the context.
bbakerman commentedon Jan 3, 2022
The linked PR has addressed this