dotansimha / graphql-code-generator-community

MIT License
119 stars 156 forks source link

feat(typescript-react-apollo): support skip token for useSuspenseQuery #835

Closed jefrydco closed 2 months ago

jefrydco commented 2 months ago

🚨 IMPORTANT: Please do not create a Pull Request without creating an issue first.

Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request.

Description

Support skip token for suspense query.

From https://www.apollographql.com/docs/react/api/react/hooks/#suspensequeryhookoptions-skip, it's mentioned that skip is deprecated in favor of skipToken for useSuspenseQuery:

We recommend using skipToken in place of the skip option as it is more type-safe. This option is deprecated and only supported to ease the migration from useQuery. It will be removed in a future release.

Related #647

Type of change

Please delete options that are not relevant.

Screenshots/Sandbox (if appropriate/relevant):

Adding links to sandbox or providing screenshots can help us understand more about this PR and take action on it as appropriate

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Test Environment:

Checklist:

changeset-bot[bot] commented 2 months ago

🦋 Changeset detected

Latest commit: c174e8c4a51f8b0719cd1afe2a7ecffe88e5f74e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------------------------------------- | ----- | | @graphql-codegen/typescript-react-apollo | Patch |

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

jefrydco commented 2 months ago

Hi @saihaj can you please help review this PR? 🙏🏼

saihaj commented 2 months ago

released @graphql-codegen/typescript-react-apollo@4.3.2