> look inside
> actually 401 Unauthorized wrapped in JSON for some reason
@tedward On one hand, GraphQL specification tried to be transport-neutral, so it doesn't specify what HTTP responses should people use when using GraphQL over HTTP. Also, since it allows multiple requests at once, how should it behave if just one request fail?
On the other hand, they should have standardized it. Like, I had issues with AniList's API due to that, if I try to optimize requests by using multiple requests (like fetching user data and show data at the same time) and one fails (like if the show or user doesn't exist), the entire request fails (in their implementation).
@qgustavor FWIW I’ve had this happen before, and it was because the API in question defined the return type as non-nullable. To support partial responses, return types must be nullable so that GQL can insert a null where the data would go, and then put a corresponding error for that null in the errors array.
A GQL implementation might rightly be unable to give you a schema-compliant partial response to your query in that case, so it has to fail the whole response.
@NfNitLoop Hey, I asked help from people from AniList on GitHub almost six years ago! https://web.archive.org/web/20200919063914/https://github.com/AniList/ApiV2-GraphQL-Docs/issues/52
Thank you for this answer!
That being said, I don't think that's the answer to this issue, unless I misread documentation on nullable fields.