Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A guide to cache related graphql-react options.

graphql-react options guide

This is a guide to the cache related options for the useGraphQL React hook. The reloadOnLoad and resetOnLoad options also apply to the GraphQL instance method operate.

Defaults

The defaults are suitable for typical query use, as apps tend to have more queries than mutations.

loadOnMount loadOnReload loadOnReset reloadOnLoad resetOnLoad

Queries

loadOnMount loadOnReload loadOnReset reloadOnLoad resetOnLoad Situation
Display a profile.

Mutations

loadOnMount loadOnReload loadOnReset reloadOnLoad resetOnLoad Situation
Login form.
Logout form.
Change password form.
Change name form.
Like a post.
@jaydenseric

This comment has been minimized.

Copy link
Owner Author

jaydenseric commented Jul 7, 2019

This guide is now maintained in the graphql-react readme useGraphQL section: https://github.com/jaydenseric/graphql-react/tree/v8.2.0#function-usegraphql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.