Automatic Purging based on Mutations

You do not need to handle all purging yourself. For example, if you pass your mutations through the Stellate Edge Cache, we analyze the responses and automatically purge documents containing modified entities.

📘

This approach has some edge cases, which you can read more about in Automatic Cache Invalidation via Mutations.

Given a (contrived) mutation that updates a specific launch:

mutation {
    updateLaunch(id: 108, mission_name: "Stellate Edge Cache Expansion") {
        __typename
        id
        name
    }
}

we would see the following response from the SpaceX backend service:

{
    "data": {
        "updateLaunch": {
            "__typename": "Launch",
            "id": "108",
            "mission_name": "Stellate Edge Cache Expansion",
        }
    }
}

Stellate would then analyze the response, see that (in this case) the Launch with ID 108 was modified, and invalidate any cached responses tagged with key:Launch:id:108


Did this page help you?