Propagate deletes via GraphQl subscription

Viewed 12

We have a GraphQL subscription to receive created/ updated notifications. This will update our cache accordingly.

type Subscription {
    notificationUpdated(): Notification!
}

type Notification {
  id: ID!
  text: String
}

This subscription will update the view with new/updated notifications, but won't delete notifications that are deleted in backend, so the list of notifications in our view keeps growing endlessly. Is there a strategy to propagate deletes to the GraphQL client? Has this to be done via a new subscription that will evict deleted notifications from the cache?

(remark: notifications are just as an example for our problem case)

0 Answers
Related