drk
06/11/2017, 10:35 PMlancej
06/12/2017, 12:11 AMuser
06/12/2017, 7:35 AMuser
06/12/2017, 7:37 AMuser
06/12/2017, 7:39 AMeliezedeck
06/12/2017, 8:31 AMdeleteSomething
mutation, how to I also clear that entry inside Apollo’s cache? I’m using the Apollo dev tools, and I can still see the deleted entry inside the Storeuser
06/12/2017, 9:26 AMnilan
06/12/2017, 9:26 AMtagsToCreate
and userId
? 🙂nilan
06/12/2017, 9:27 AMuser
06/12/2017, 9:28 AMuzu
06/12/2017, 9:30 AMidkjsx
06/12/2017, 9:57 AMlancej
06/12/2017, 10:46 AMimport { request } from 'graphql-request'
const mutation = `{
mutation signinUser($email: String!, $password: String!) {
signinUser(email: { email: $email, password: $password }) {
token,
user {
id
}
}
}
}`
const variables = {
email,
password
}
request('<https://api.graph.cool/simple/v1/xkjdvsdf>', mutation, variables)
.then(data => {
console.log(data)
})
picosam
06/12/2017, 1:12 PMpicosam
06/12/2017, 1:12 PMmattc
06/12/2017, 1:15 PMmattc
06/12/2017, 1:16 PMdbkooper
06/12/2017, 1:17 PMeliezedeck
06/12/2017, 1:24 PMpostId
as the ID of the Post to be deleted, deletePostMutation
as the mutation GQL that I import from another file]eliezedeck
06/12/2017, 1:26 PMallPostsQuery
is also an imported GQLnilan
06/12/2017, 1:26 PMapollo-client
or react-apollo
. I think a question on StackOverflow should be the best formar to discuss it.eliezedeck
06/12/2017, 1:27 PMeliezedeck
06/12/2017, 1:27 PMvue-apollo
too, because I’m using VueJSnilan
06/12/2017, 1:28 PMnilan
06/12/2017, 1:28 PMnilan
06/12/2017, 1:28 PMapollo-client
because it manages the storeeliezedeck
06/12/2017, 1:28 PMdk0r
06/12/2017, 1:45 PMuser
06/12/2017, 2:46 PMcache
is modifyable, and when you write it back, it will only affect the query in question, not the whole storage; the whole cache storage is what I’m trying to update here.
Secondly, I tried to modify the store.data
, which contains entries like Post:azeauzeiorpaehyioptzetzer
and delete that manually, but the data remains the same in the cache.