Status codes for non-fatal properties
See original GitHub issueI just ran into an issue while using Apollo Client with Hasura. Since Hasura always returns a 400 status code when there’s an error in the query, Apollo Client will always treat that error as a networkError
and not pull the graphql errors out of the response.
Apollo client expects a query with non-fatal errors (it seems like that means if there’s a query with optional fields that fail) to return as a 200 with the errors
property instead of the data
property.
Can the status codes be changed in Hasura to have full compatibility with Apollo Client?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top Results From Across the Web
SINGLE FAMILY DEFAULT MONITORING SYSTEM (SFDMS ...
Non-Fatal Error Code – Reporting transaction was accepted into SFDMS with this ... The property is subject to probate (often a reason for....
Read more >TABLE 1. Incidence rates of nonfatal occupational injuries and ...
Industry(2), NAICS code(3), Total recordable cases, Cases with days away from work, job restriction, or transfer, Other recordable cases.
Read more >California Historical Resource Status Codes
California Historical Resource Status Codes. 1. Properties listed in the National Register (NR) or the California Register (CR).
Read more >State of Massachusetts Crash Report Overlay Code Sheet
Occurred on a Public Way. Property Damage of $1,000 or greater to any Vehicle/Property. Non-Fatal Personal Injury. Resulted in a Fatality.
Read more >Player errors and warnings - RxPlayer Documentation
The event listener will take the non-fatal error directly in argument. ... A NetworkError can only have the following code ( code property):....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The new
/v1/graphql
will have this behaviour. Will be part of the next release.The GraphQL spec doesn’t say anything about the transport layer and the HTTP best practices section on graphql.org doesn’t talk about status codes. I think the only sane option left is to check what the most popular graphql clients expect and decide based on that? @coco98 @shahidhk