jaydenseric / graphql-react

A GraphQL client for React using modern context and hooks APIs that is lightweight (< 4 kB) but powerful; the first Relay and Apollo alternative with server side rendering.
https://npm.im/graphql-react
MIT License
718 stars 22 forks source link

Switch to user defined cache keys #56

Closed jaydenseric closed 3 years ago

jaydenseric commented 3 years ago

Currently, cache keys are a hash of the fetch options for the GraphQL operation.

A much simpler system is to allow users to define an arbitrary cache key for a GraphQL operation. This will result in a smaller, easier to understand API and a smaller bundle size without the fnv1a dependency.