I want to use ETags for fetch controlling. So i can use ETags in my swift app, persistent, and load swift data instead of fetching if nothing has been updatet.
When i query localhost API, not thru Apollo router it works: xx@xx:/var/www/xx/xx$ curl -i -X POST -H “Content-Type: application/json” -H “X-User-Id: 1” -d ‘{ “query”: “query { hasUserPhoto }” }’ http://localhost:xx/graphql
HTTP/1.1 200 OK
date: Sat, 15 Feb 2025 01:40:27 GMT
server: uvicorn
content-length: 33
content-type: application/json
vary: ETag
etag: f8320b26d30ab433c5a54546d21f414c ← here we get the etag.
And with apollo router: xx@xx:/var/xx/xx/xx$ curl -i -X POST -H “Content-Type: application/json” -H “X-User-Id: 1” -d ‘{ “query”: “query { hasUserPhoto }” }’ http://localhost:xx/graphql
HTTP/1.1 200 OK
content-type: application/json
vary: origin
content-length: 31
date: Sat, 15 Feb 2025 01:39:06 GMT ← none ? I actually use X-User-header for extracting Id. But i do not know if that a relevant part. Thats thru kong. Do we need to add propagination., ETag can be practice for using as a fetching controller isnt that right?