Skip to content

Instantly share code, notes, and snippets.

@jeznag jeznag/cache-update
Created Aug 14, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.