-
Notifications
You must be signed in to change notification settings - Fork 161
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
useSuspenseQuery
support
#388
Comments
Please also add support for |
would you like to send in a PR? |
Thank you @Hal-ang! @graphql-codegen/[email protected] |
I'm so happy~~ Thank you |
Made a follow-up issue for |
So, how can I disable it in config? |
didn't find this option, had to revert to the previous version |
The workaround might be to use codemod to remove all SuspenseQuery functions and types. |
…ableQuery Implement `useBackgroundQuery` and `useLoadableQuery` hooks for React Apollo. These APIs are added in 3.8.0 and 3.9.0 respectively. Suspense support in Apollo Client provides 5 new hooks as described in https://www.apollographql.com/docs/react/data/suspense/. `useSuspenseQuery` support was added in dotansimha#434. Among other 4 hooks, `useBackgroundQuery` and `useLoadableQuery` are the ones that take a GraphQL document as an argument like other existing hooks. The support for these hooks are added in this change. Other hooks, `useQueryRefHanders` and `useReadQuery` do not take a GraphQL document as an argument, so they do not need to be added as the generated code. Both take the return values of other hooks as an argument, and the types are inferred from it. Follow up to dotansimha#388. Fixes dotansimha#477.
Is your feature request related to a problem? Please describe.
Add support for
useSuspenseQuery
introduced in apollographql/apollo-client#10323Describe the solution you'd like
Allow to generate
useSuspenseQuery
hooks instead/additionally to currentuseQuery
hooksDescribe alternatives you've considered
No response
Is your feature request related to a problem? Please describe.
No response
The text was updated successfully, but these errors were encountered: