-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Support skipToken with useQuery
#12895
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
Conversation
🦋 Changeset detectedLatest commit: 89ca02a 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, 2 changed, 0 removedBuild ID: ccca34baa4b138bd8f97e246 URL: https://www.apollographql.com/docs/deploy-preview/ccca34baa4b138bd8f97e246 |
| @@ -0,0 +1,13 @@ | |||
| --- | |||
| "@apollo/client": patch | |||
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.
We still want this as a patch correct?
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.
Maybe we add a little bit more prose to explain why we do it as a patch (variables are hard to use with the new types otherwise) to the changeset, but yeah, I think this can count as a fixup of an oversight.
commit: |
| </tbody> | ||
| </table> | ||
| <MinVersion version="4.0.4"> |
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.
May need updating if we don't get this in 4.0.4
size-limit report 📦
|
| await expect(takeSnapshot).not.toRerender(); | ||
| }); | ||
|
|
||
| it("should refetch when providing skipToken", async () => { |
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 one is so weird since technically the variables are gone now.
How should we handle this if you go from passing in variables to skipToken - should refetch refetch with the previous variables, or with no variables?
This might need a bit of thought.
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.
Discussed in person. Since useSuspenseQuery and useBackgroundQuery allow refetch with skipToken, we are going to leave this the same. This could mean you see runtime errors if refetching with required variables.
Co-authored-by: Lenz Weber-Tronic <lorenz.weber-tronic@apollographql.com>
|
Before merge, update the changelog description |
901140e to
8f8004d
Compare
Closes #11524
Add support for
skipTokenwithuseQuery.