eslint-plugin-enforce-initial-fetch-policy
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

Enforce initialFetchPolicy

The Apollo Client currently replaces values of fetchPolicy when isPolling is set. This will often lead to unintended caching behavior. Specifying a value of no-cache for initialFetchPolicy is the only way to prevent the caching of polled queries. This rule enforces that the initialFetchPolicy is set when isPolling is set to make sure the user is aware of the caching behavior.

See: https://github.com/apollographql/apollo-client/blob/72c625d96f172e25563f5bba6e45531abac1deb3/src/core/ObservableQuery.ts#L750-L754

Readme

Keywords

none

Package Sidebar

Install

npm i eslint-plugin-enforce-initial-fetch-policy

Weekly Downloads

8

Version

1.0.8

License

Apache-2.0

Unpacked Size

37.6 kB

Total Files

26

Last publish

Collaborators

  • moia-dev-team