Support skipToken with useQuery#12895
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.
We still want this as a patch correct?
There was a problem hiding this comment.
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.
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.
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.
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.