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
Conditional Fetching #157
Comments
Interested in how people are going about this too! |
It's the same as a normal SWR hook:
|
This is when the key is provided by the user. Is there any alternative when the key is autogenerated? I think it's not possible at the moment. If I can propose some solutions:
|
While waiting for this feature to be implemented, I create a fork (published on npm) that let you conditional fetch (and other things). https://github.com/ramiel/graphql-codegen-plugin-typescript-swr I also made a PR with a POC |
I'm submitting a ...
[ ] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ X] question about how to use this project
Summary
how to use Conditional Fetching with the generated query?
Other information (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)
https://swr.vercel.app/docs/conditional-fetching
The text was updated successfully, but these errors were encountered: