Created
August 14, 2018 06:34
-
-
Save jeznag/5156ad0b18cea2b76238a2f959cf397d to your computer and use it in GitHub Desktop.
cache updating code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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