to get a personalized navigation.
to get a personalized navigation.
Hi there,
When I'm sending a query with syntax error I still get a 200 response-code. But I actually don't know what the standard graphql specification says about that - maybe this is correct due to spec?
Florian
This topic is discussed here: https://docs.business.visma.net/docs/features/errors
You will always get a 200 response with GraphQL, unless your token is expired. Then it's 401. All errors are reported in the errors-property on the response object, and some libraries (like StrawberryShake) provide helpers like ".EnsureSuccessful()" to verify that the response is without errors.
The drawback with this is that a query or mutation can be partially successful and return a warning, but you won't consider it an error.
Copyright © 2022 Visma.com. All rights reserved.