Marco Pierucci
05/15/2024, 9:22 AMextend type WorkOrderType @typePolicy(keyFields: "id")
and this records key like:
workOrder({"id":"J-2B387F98"})
workOrder({"id":"J-2B387F98"}).project
The proper way to delete them would be
apolloClient.apolloStore.remove(CacheKey("WorkOrder:${workorderId}"))
but it has no effectmbonnin
05/15/2024, 9:25 AMworkOrder({"id":"J-2B387F98"})
sounds like a field key from the root for a query like
query GetWorkOrder($id: String) {
workOrder(id: $id) { ... }
}
mbonnin
05/15/2024, 9:25 AMCacheKey("WorkOrder:${workorderId}")
mbonnin
05/15/2024, 9:26 AMCacheKey("WorkOrder:${workorderId}")
record doesn’t remove the root field references (if this is what you were expecting?)Marco Pierucci
05/15/2024, 9:27 AMmbonnin
05/15/2024, 9:27 AMMarco Pierucci
05/15/2024, 9:27 AMmbonnin
05/15/2024, 9:28 AMMarco Pierucci
05/15/2024, 9:28 AMmbonnin
05/15/2024, 9:28 AMmbonnin
05/15/2024, 9:28 AMmbonnin
05/15/2024, 9:29 AMwriteOperation
with the new dataMarco Pierucci
05/15/2024, 9:29 AMMarco Pierucci
05/15/2024, 9:29 AMMarco Pierucci
05/15/2024, 9:29 AMmbonnin
05/15/2024, 9:29 AMmbonnin
05/15/2024, 9:30 AMCacheKey("WorkOrder:${workorderId}")
should still trigger a cache missmbonnin
05/15/2024, 9:30 AMworkOrder({"id":"J-2B387F98"})
which points to CacheKey("WorkOrder:${workorderId}")
and trigger a cache miss at that pointmbonnin
05/15/2024, 9:31 AMMarco Pierucci
05/15/2024, 9:32 AMMarco Pierucci
05/15/2024, 9:33 AMmbonnin
05/15/2024, 9:33 AMMarco Pierucci
05/15/2024, 9:34 AM