When deleting something through apollo, the object must be manually evicted from the cache. The update function to do that is passed to useMutation, and doesn't have access to the variables passed to the invocation of the mutation. So have to return the now-deleted ID as part of the mutation's selection set, for the update function to use.
When deleting something through apollo, the object must be manually evicted from the cache. The update function to do that is passed to
useMutation
, and doesn't have access to the variables passed to the invocation of the mutation. So have to return the now-deleted ID as part of the mutation's selection set, for the update function to use.