-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: bug where query is stuck on loading if final chunk contains only hasNext: false
#10735
fix: bug where query is stuck on loading if final chunk contains only hasNext: false
#10735
Conversation
…ly hasNext: false
🦋 Changeset detectedLatest commit: 30f6726 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…al-key-stuck-loading
✅ Deploy Preview for apollo-client-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
…k-loading' of github.com:apollographql/apollo-client into issue-10406-deferred-chunk-with-no-incremental-key-stuck-loading
hasNext: false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing 🙌
/release:pr |
A new release has been made for this PR. You can install it with |
Closes #10406.
The Router implemented a
@defer
spec proposal update in how it handles deferred responses that point to an element that was nullified inv1.6.0
that caused one of our client E2E tests that tested non-null errors thrown outside of deferred fragments to begin failing.What was previously a final chunk of
{"hasNext":false,"incremental":[{"data":null, path:...}]}
now returns{"hasNext":false}
, without anincremental
key.The web client was not prepared to handle final chunks containing only
{hasNext: false}
despite it being a valid payload, and the result is a permanentloading: true
state. This fix ensures that if a chunk indicates it is the final one without anyincremental
data, the observable is completed.Tested the fix with the E2E test repo:

Checklist: