Skip to content
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

feat(typescript-react-apollo): support useBackgroundQuery and useLoadableQuery #815

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Aug 7, 2024

  1. feat(typescript-react-apollo): support useBackgroundQuery and useLoad…

    …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.
    draftcode committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    b5a7f64 View commit details
    Browse the repository at this point in the history