apollo-datasource-http
Advanced tools
Comparing version 0.10.2 to 0.11.0
@@ -68,2 +68,3 @@ /// <reference types="node" /> | ||
put<TResult = unknown>(path: string, requestOptions?: RequestOptions): Promise<Response<TResult>>; | ||
patch<TResult = unknown>(path: string, requestOptions?: RequestOptions): Promise<Response<TResult>>; | ||
private performRequest; | ||
@@ -70,0 +71,0 @@ private request; |
@@ -94,2 +94,11 @@ "use strict"; | ||
} | ||
async patch(path, requestOptions) { | ||
return this.request({ | ||
headers: {}, | ||
...requestOptions, | ||
method: 'PATCH', | ||
path, | ||
origin: this.baseURL, | ||
}); | ||
} | ||
async performRequest(options, cacheKey) { | ||
@@ -157,5 +166,4 @@ this.onRequest?.(options); | ||
if (request.method === 'GET') { | ||
const cachedResponse = this.memoizedResults.get(cacheKey); | ||
if (cachedResponse) { | ||
const response = await cachedResponse; | ||
if (this.memoizedResults.has(cacheKey)) { | ||
const response = await this.memoizedResults.get(cacheKey); | ||
response.memoized = true; | ||
@@ -162,0 +170,0 @@ response.isFromCache = false; |
{ | ||
"name": "apollo-datasource-http", | ||
"version": "0.10.2", | ||
"version": "0.11.0", | ||
"author": "Dustin Deus <deusdustin@gmail.com>", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27214
271