question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Status codes for non-fatal properties

See original GitHub issue

I 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:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
0x777commented, May 10, 2019

The new /v1/graphql will have this behaviour. Will be part of the next release.

1reaction
0x777commented, Jan 17, 2019

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found