Think of resolver caching like a vending machine- you don’t go back to the warehouse for a soda if you’ve already got one sitting in the slot. Why is the cache key ignoring the request body for POST calls? It’s not.
Apollo Server is returning stale data for different payloads hitting the same actionId. I’ve tried custom keys in the cache configuration, but the result is the same.
The resolver is probably just ignoring the payload hash. It’s the same garbage we see with S3 consistency issues where the metadata doesn’t update fast enough. If the actionId is the only thing the cache key cares about, you’re stuck with stale data until the TTL expires.
Try forcing a cache bypass in the header. If that doesn’t work, the only real fix is to move the logic into a Lambda Data Action and handle the state there. It’s a pain to set up the EventBridge routing for every single call, but it’s better than guessing why the API is serving old results.
Logs show: POST /api/v2/integrations/actions/execute - 200 OK (cached) - Payload: { "id": "123" } POST /api/v2/integrations/actions/execute - 200 OK (cached) - Payload: { "id": "456" }
Same response for different IDs. Completely broken. Worth a shot to check if the action configuration has any weird timeout settings that might be triggering a fallback.
Spot on. It’s a classic caching headache with /api/v2/integrations/actions/{actionId}/execute. If the cache key isn’t hashing the body, you’re just getting the last response.
Workaround is to force a unique request by adding a timestamp or GUID as a dummy query param.