QueryManager.inFlightLinkObservables: use a strong Trie#11345
QueryManager.inFlightLinkObservables: use a strong Trie#11345phryneas merged 14 commits intorelease-3.9from
QueryManager.inFlightLinkObservables: use a strong Trie#11345Conversation
🦋 Changeset detectedLatest commit: 7fb21fa 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 |
size-limit report 📦
|
|
@phryneas just to clarify the intent of this change, is this strictly to shave off some bytes from the end build size, or will this have a memory impact as well since the printed query string can now be shared for multiple variables in the |
|
@jerelmiller This is really just a "shaving off bytes" - the structure was a Map of Maps before and is a Map of Maps (in the form of a Trie) now. Thing is, we add slightly more bundle size as the => Implementation changes, but no observable behaviour will change in any way. That will happen in other places where we will use the new |
|
@phryneas thats helpful to understand! Appreciate the context here :) |
|
/release:pr |
|
A new release has been made for this PR. You can install it with |
|
/release:pr |
|
A new release has been made for this PR. You can install it with |
|
I've fixed up some tests, added a runtime warning if used with oudated versions of Requesting a re-review for that reason :) You can see these changes here: On the other side, I've opened the PR apollographql/apollo-client-integrations#144 to accommodate for the changes in this PR. Please give it a review, too :) |
| // TODO: remove before we release 3.9 | ||
| Object.defineProperty(this.inFlightLinkObservables, "get", { | ||
| value: () => { | ||
| throw new Error( | ||
| "This version of Apollo Client requires at least @apollo/experimental-nextjs-app-support version 0.5.2." | ||
| ); | ||
| }, | ||
| }); |
There was a problem hiding this comment.
You can see this work out over in apollographql/apollo-client-integrations#144 (comment)
jerelmiller
left a comment
There was a problem hiding this comment.
Thanks for catching that update to the Next.js package!
Since
@wryware/[email protected]now has aremovefunction, we can use that data structure inQueryManager.inFlightLinkObservablesand shave off a few bytes here.Should not be merged before we have a new
optimismversionBefore merging/releasing: add handling to
@apollo/experimental-nextjs-app-supportChecklist: