ApiV2-GraphQL-Docs
ApiV2-GraphQL-Docs copied to clipboard
All queries fail when one fails
It's similar to this issue: when doing multiple queries and some fails it returns 404 and null
on all fields.
As an example here's a simplified GraphQL query, the variables and the returned data:
query ($id: Int, $userName: String, $type: MediaType){
MediaList(userName: $userName, mediaId: $id, type: $type) {
status
}
Media(id: $id, type: $type) {
episodes
}
}
{"userName": "qgustavor", "type": "ANIME", "id": 103871}
{
"data": {"MediaList": null, "Media": null},
"errors": [{
"message": "Not Found.", "status": 404, "locations":[{"line": 3, "column": 3}]
}]
}
- Expected result: data from the second query is returned.
- Current behavior:
null
is returned.
@qgustavor Not sure if it was fixed, but currently am getting data back with that given request.

Are you still getting null returned?
I added this anime to my list so it will not return 404 anymore. Try again with a random id like 1000, 1234, 1639 or 2406. I just tried again with 2406 and it returned this:
{
"data": {"MediaList": null, "Media": null},
"errors": [{
"message": "Not Found.", "status": 404, "locations": [{"line": 3, "column": 3}]
}]
}
Was able to recreate! I agree with your intended solution
I've run into this issue as well. It's especially problematic when requesting a large number of items at once (50), and if any one of them is not found the entire batch fails.
I have encountered this problem as well, has anyone been able to find a solution?