apollo-response-cache icon indicating copy to clipboard operation
apollo-response-cache copied to clipboard

Usage

Open RichardWright opened this issue 3 years ago • 1 comments

Hi!

I have a long running background process which I use to trigger subscriptions. This is also is the source of queries. If I use an output cache, the results could potentialy become out of date. Is there a none resolver directive way of using project to invalid cache entries?

RichardWright avatar May 06 '21 14:05 RichardWright

@RichardWright invalidateFQC may fit for you though it's undocumented.

import { invalidateFQC } from '@matters/apollo-response-cache'

invalidateFQC({
  node: { type: NODE_TYPE, id: NODE_ID },
  redis: REDIS_INSTANCE,
})

robertu7 avatar May 10 '21 05:05 robertu7