This package has been deprecated

Author message:

This package is no longer maintained

@cometjs/apollo-client-utils
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

@cometjs/apollo-client-utils

useQuery

Restrict Apollo Client's useQuery with pre-defined N-variants.

This utility helps to make behavior more predictable and type-safety by restricting some options and variants. (1-Query, 3-Variants)

It hides some options that included in Apollo Client by default, to avoid relying on over-exposed API surface.

For example pollInterval, if you necessary it, you should call refetch() in useEffect by your hand. (Seriously, instead of relying on a black-box, separate it per concern)

Partial rendering and errorPolicy: all (which makes possible variants infinity) are intentionally disallowed. If you need it, use the Apollo Client as it is.

Readme

Keywords

none

Package Sidebar

Install

npm i @cometjs/apollo-client-utils

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

708 kB

Total Files

20

Last publish

Collaborators

  • cometkim