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.

Handle partial responses when the server returns an error

See original GitHub issue

XXX in QueryManager#makeRequest.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:50 (21 by maintainers)

github_iconTop GitHub Comments

21reactions
stale[bot]commented, Aug 10, 2017

This issue has been automatically closed because it has not had recent activity after being marked as stale. If you belive this issue is still a problem or should be reopened, please reopen it! Thank you for your contributions to Apollo Client!

8reactions
oliverjamcommented, Oct 13, 2017

Can we re-open this? The problem still exists—I just hit it today.

Querying event data means that for some languages e.g. a town might not exist and returns null.

query eventQuery {
  transaction(id: 111111) {
    performance(siteId: 1) {
      venue {
        name
        town
      }
    }
  }
}

We get this response:

{
  "data": {
    "transaction": {
      "performance": {
        "venue": {
          "name": "Kobetamendi",
          "town": null,
        }
      }
    }
  },
  "errors": [
    {
      "message": "Error trying to resolve town.",
      "locations": [
        {
          "line": 9,
          "column": 11
        }
      ]
    }
  ]
}

Apollo doesn’t pass any of the partial data it gets right now, which is frustrating.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling operation errors - Apollo GraphQL Docs
If a GraphQL operation produces one or more resolver errors, your server's response might still include partial data in the data field:.
Read more >
Http status and reponse in case the API gives out partial ...
I'd prefer a 2xx, but with a separate status field to indicate that not all resources were available.
Read more >
Correct way to notify http client of error after partial response ...
The client has already received status code 200 so it thinks it is okay. Can the server still terminate the connection in such...
Read more >
How to handle Partial Content in Node.js | by Vishal Patel
In this post, I would like to talk about how to handle Range request and step by step implementation with Node.js.
Read more >
206 Partial Content - HTTP - MDN Web Docs
The HTTP 206 Partial Content success status response code indicates that the request has succeeded and the body contains the requested ranges of...
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