StarpTech / apollo-datasource-http

Optimized JSON HTTP Data Source for Apollo Server
MIT License
73 stars 32 forks source link

Support ETag #13

Closed nmokkenstorm closed 2 years ago

nmokkenstorm commented 3 years ago

Hey, first of all thanks for the work on this alternative implementation for http/rest based Apollo datasources. Both the official version and this one currently don't support ETag and/or other related complex headers for caching purposes. I'd be interested in figuring out how to make this work, but I thought I'd first check in to see if that'd be something that would be appreciated.

StarpTech commented 3 years ago

Hi @nmokkenstorm, do you use ETag in production? ETag would require that apollo-datasource-http stores all ETags in the cache and handle the If-None-Match revalidation flow.

Would you mind working on this? Please add tests as well.

nmokkenstorm commented 3 years ago

Yeah would love to figure this out. We use Etag with what Nest.js provides out of the box, but a while ago I had a more bespoke project that does similar things.

StarpTech commented 2 years ago

Closing due to inactivity.