Exceptions
Any errors during resolution of a GraphQL query are returned as part of the API response.
Using GraphQL's introspection capabilities in conjunction with respective tooling allows to avoid many potential errors already during development. However of course, not all failures can be prevented.
Since a complex GraphQL query can involve many separate data sources to resolve various fields, the resolution can fail partially and still succeed in the remaining parts.That's why a response can contain a list of errors
in addition to a data
property.
Authorization Error
Unauthorized requests cannot be resolved properly. All top-level fields in the included query will default to null
and the failed resolutions be reported as part of the list of occured errors
.
Let's a ssume the following query to fetch 8.SET Compose product sets for two different products from your catalogue at the same time:
If this query would be sent in an unauthorized request (notice the missing x-api-id
header):
The result would list both failures to resolve product sets for productA
as well as productB
:
Last updated