Skip to content

Instantly share code, notes, and snippets.

@jeznag
Created August 14, 2018 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeznag/5156ad0b18cea2b76238a2f959cf397d to your computer and use it in GitHub Desktop.
Save jeznag/5156ad0b18cea2b76238a2f959cf397d to your computer and use it in GitHub Desktop.
cache updating code
const updateCache = (cache: any) => {
const { availableOptions } = cache.readQuery({ query: getAvailableOptions });
cache.writeQuery({
query: getAvailableOptions,
data: {
availableOptions: {
...availableOptions,
submitted: true
}
}
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment