feat(core): add deferred fragment utilities - #3906
Open
JoviDeCroock wants to merge 2 commits into
Open
Conversation
🦋 Changeset detectedLatest commit: 808921f 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 |
The Client now associates and resolves deferred sidecar promises for streamed query results inside makeResultSource, so bindings need no per-binding wiring. The per-client deferred cache is removed, and the new makeFragmentSource primitive exposes masked fragment snapshots that re-emit as deferred patches arrive. Public exports are reduced to maskFragment, getFragments, and makeFragmentSource. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Deploying urql with
|
| Latest commit: |
808921f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://30ed27a6.urql.pages.dev |
| Branch Preview URL: | https://feat-deferred-fragment-core.urql.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@urql/core:maskFragment,getFragments, andmakeFragmentSourceClientnow associates stable sidecar promises with missing fields in streamed@deferquery results inside its result pipeline, resolving them as patches arrive or on operation teardown — bindings need no wiringmakeFragmentSourceissues masked fragment snapshots and re-emits as deferred patches stream in, giving non-Suspense frameworks (Vue/Svelte/Solid) the same primitive@include,@skip, and@defer(if:)against operation variablesmaskFragment,getFragments,makeFragmentSource+ their types; the deferred-state machinery stays internalThis is the core-only first part of the split of #3888. Framework integrations follow in separate stacked PRs.