@Dennis it seems the redirect idea is not working. Here is what I did:
In netlify.toml:
[[redirects]]
from = "/api/v1/graphql"
to = "/.netlify/functions/api-proxy-HASH"
In package.json, I prepended my build command with:
sed -i s/HASH/${COMMIT_REF}/g netlify.toml &&
And before building the functions, I execute:
mv src/api-proxy.js src/api-proxy-$COMMIT_REF.js
After deploy, I can see that the function was created and deploy with the appended name, however I still receive an old response when I hit /api/v1/graphql
.
Can you double confirm whether this caching issue happens before or after redirect rules are applied? Or maybe I’m missing something in my changes?