File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -301,7 +301,15 @@ export abstract class HTTPDataSource<TContext = any> extends DataSource {
301301 cachedResponse . isFromCache = false
302302 return cachedResponse
303303 }
304+ }
305+
306+ const options = {
307+ ...this . globalRequestOptions ,
308+ ...request ,
309+ }
304310
311+ // let's see if we can fill the memoized cache
312+ if ( options . method === 'GET' ) {
305313 // try to fetch from shared cache
306314 if ( request . requestCache ) {
307315 const cacheItem = await this . cache . get ( cacheKey )
@@ -312,15 +320,7 @@ export abstract class HTTPDataSource<TContext = any> extends DataSource {
312320 return cachedResponse
313321 }
314322 }
315- }
316-
317- const options = {
318- ...this . globalRequestOptions ,
319- ...request ,
320- }
321323
322- // let's see if we can fill the memoized cache
323- if ( options . method === 'GET' ) {
324324 const response = await this . performRequest < TResult > ( options , cacheKey )
325325
326326 if ( this . isResponseCacheable < TResult > ( options , response ) ) {
You can’t perform that action at this time.
0 commit comments