-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add list support to useFragment
, useSuspenseFragment
, and client.watchFragment
#12971
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
base: release-4.1
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 1d0e27c The changes in this PR will be included in the next version bump. 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 |
✅ Docs preview readyThe preview is ready to be viewed. View the preview File Changes 0 new, 10 changed, 0 removed
Build ID: 8b14569e469e89d32b062239 URL: https://www.apollographql.com/docs/deploy-preview/8b14569e469e89d32b062239 |
commit: |
}) as Observable<any>; | ||
|
||
return Object.assign(observable, { | ||
getCurrentResult: () => { |
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.
Could we return something with a changeTargets
property here? That way we wouldn't need to unwatch/rewatch 999 unrelated elements if one id changed.
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.
Yes! I was planning to do that next 🙂.
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.
This is now implemented with reobserve
which will only watch
new ids and keep ids that haven't changed around 🙂
useFragment
useFragment
, useSuspenseFragment
, and client.watchFragment
c427a20
to
d4072da
Compare
f542b84
to
1d0e27c
Compare
Add support for lists with
useFragment
,useSuspenseFragment
, andclient.watchFragment
.