Closed paolommj closed 2 years ago
Do you want to cache POST requests? We can introduce a request option enforceCache
? Would you like to create a PR? Don't forget to add tests.
you already have this overridable method https://github.com/StarpTech/apollo-datasource-http/blob/d234a105b3166d2ec0fd4b12ebb6764145005fb2/src/http-data-source.ts#L133-L138
that may be used in some way? what do you think?
I'm not sure if I have the time for a PR soon, but I might be
you already have this overridable method
This is about the response cache not if the request should be memorized. At this point, we have no response.
yes, i was implying something with the same approach
protected isRequestCacheable
Closing due to inactivity. Feel free to reopen.
Hi there, I would like to reopen this one, appending a PR https://github.com/StarpTech/apollo-datasource-http/pull/24 Feel free to change or comment on that.
Thank you
Nice job on the datasource, it is a joy to use.
there may be some use cases in with a cacheable response doesn't have a GET method, ex: when querying another graphql or an elasticsearch, but in https://github.com/StarpTech/apollo-datasource-http/blob/d234a105b3166d2ec0fd4b12ebb6764145005fb2/src/http-data-source.ts#L378 only GET requests are retrieved from cache