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
We are currently having problem that we get errors from invalid variables passed to the queries, and we tag them as server side errors instead of user errors, and this causes unnecessary errors in the monitoring / tracing and eventually even paging of the on-call duty.
Examples
type Query{
parameterField(param: String!): String
}
type Mutation {
inputMutation(input: TestInput!): String
}
input TestInput { id: ID! }
I think this is solvable in user land as GraphQL JIT does not run the GraphQL validation. We can add error codes for compilation errors - but if the purpose of this would be to only detect if compilation errors are present, then it's best left to the project using JIT. For example, in the pipeline, you can simply attach error code after each step -
We are currently having problem that we get errors from invalid variables passed to the queries, and we tag them as server side errors instead of user errors, and this causes unnecessary errors in the monitoring / tracing and eventually even paging of the on-call duty.
Examples
Example 1
Calling
without variable results in:
Example 2
Calling
with
causes
Workaround
We can currently only parse this kind of errors from the GraphQL error message. It would be helpful to have indication for user error type.
Possible solution
The thrown errors have a field or other clear mechanism to indicate that the error is a user error.
The text was updated successfully, but these errors were encountered: