How do I throw an array from GraphQLError? #7878
Unanswered
matheuspleal
asked this question in
Q&A
Replies: 1 comment
-
This issue comes from the underlying graphql-js library: graphql/graphql-js#205 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
To give an example, when this mutation is performed:
If no value is assigned to the variables, an errors array is returned with the missing fields:
However, if I want to throw a custom exception, the documentation shows how to use GraphQLError (here)
But in this exemplified behavior, I can only throw one exception, that is, the errors array returned by the apollo server, contains only one object
Could anyone help me please?
Beta Was this translation helpful? Give feedback.
All reactions