Replies: 1 comment 8 replies
-
What does the schema definition for |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there 👋
First of all, big thanks to all the community involved in contributing to this GraphQL PHP implementation! 🙌
I'm raising up this issue as I've come across a recurring error in my Webonyx GraphQL PHP integration related to query arguments types.
When a client passes an array argument to a query as shown in the example below:
this produces the following type exception:
GraphQL\Type\Definition\Type::getNullableType(): Argument #1 ($type) must be of type GraphQL\Type\Definition\Type, null given, called in webonyx/graphql-php/src/Validator/Rules/ValuesOfCorrectType.php on line 75
resulting in the request returning a 200 status code with an empty response.
Performing the same query with a boolean, integer, string, object or null argument value does not produce the same error and runs as expected.
Should this be handled differently where we allow for array type arguments even if they're not defining a type, but simply holding array values? If not possible or intended by design, would it make sense to adjust the error handling in this case so the request returns a readable and contextual error?
Beta Was this translation helpful? Give feedback.
All reactions