- Notifications
You must be signed in to change notification settings - Fork2.7k
keep deferred inFlightLinkObservables until the response is finished#12338
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
keep deferred inFlightLinkObservables until the response is finished#12338
Uh oh!
There was an error while loading.Please reload this page.
Conversation
changeset-botbot commentedFeb 4, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
🦋 Changeset detectedLatest commit:b201bc0 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 |
svc-apollo-docs commentedFeb 4, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
|
pkg-pr-newbot commentedFeb 4, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
commit: |
netlifybot commentedFeb 4, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview forapollo-client-docs ready!
To edit notification comments on pull requests, go to yourNetlify site configuration. |
github-actionsbot commentedFeb 4, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
size-limit report 📦
|
I have verified over inapollographql/apollo-client-integrations#424 that this is exactly what this needs. Gonna polish this PR, add a few tests and then we should get this into 3.13. |
b0183ec
tob201bc0
CompareAdded a test, this should be ready for review. |
concast.beforeNext(function cb(method, arg: FetchResult) { | ||
if (method === "next" && "hasNext" in arg && arg.hasNext) { | ||
concast.beforeNext(cb); | ||
} else { | ||
inFlightLinkObservables.remove(printedServerQuery, varJson); | ||
} |
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.
Note that this change right now applies to@defer
etc., but not to subscriptions.
Changing that for subscriptions would be nice, but feels a bit more breaking, so I think we should probably do that in 4.0 - WDYT@jerelmiller ?
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.
That makes sense to me. I see no reason why two subscriptions kicked off with the same document/variables shouldn't be deduped, especially since it can be disabled per-subscription if need be. Mind making a tracking issue and putting it in the milestone so that we don't forget to update?
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.
#12348 👍
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.
Fantastic test addition that demonstrates all the things I was hoping to see. Thanks for getting this done!
67c16c9
intorelease-3.13Uh oh!
There was an error while loading.Please reload this page.
We're getting to a point where we have all the tools in place that writing these tests is actually fun :) |
An experiment. This might be required for query streaming with
@defer
anduseSuspenseQuery
.