folded-ear / gobrennas-api

HTTP API for gobrennas.com
https://gobrennas.com
MIT License
1 stars 0 forks source link

new Deletion type for graphql deletions, so apollo can get the ID #59

Closed barneyb closed 4 months ago

barneyb commented 4 months ago

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.