-
I've got this query. The return type is a nullable Project: query projectPage($projectCode: String!) {
projectByCode(code: $projectCode) {
id
name
code
}
} When I invalidate the matching project: cache.invalidate({__typename: 'Project', id: args.input.projectId}); Then the next execution of the query still hits the cache ( I think I read somewhere that this is probably, because My current workaround is to use Many thanks 🙂 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I was not understanding things correctly. What was actually happening is that
So, what I actually needed to fix this was either:
I ended up doing both for now. |
Beta Was this translation helpful? Give feedback.
I was not understanding things correctly. What was actually happening is that
cache.invalidate()
was causing my query store to updateSo, what I actually needed to fix this was either:
pause()
thequeryStore
, because I know it will returnnull
and I don't want that to get cached ORcacheExchange
that invalidates nulls as they arriveI ended up doing both for now.