graphql-request
Advanced tools
Comparing version 1.3.5-alpha to 1.3.5
@@ -68,3 +68,3 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var body, response, result; | ||
var body, response, result, errorResult; | ||
return __generator(this, function (_a) { | ||
@@ -87,3 +87,4 @@ switch (_a.label) { | ||
else { | ||
throw new types_1.ClientError(__assign({}, result, { status: response.status }), { query: query, variables: variables }); | ||
errorResult = typeof result === 'string' ? { data: result } : result; | ||
throw new types_1.ClientError(__assign({}, errorResult, { status: response.status }), { query: query, variables: variables }); | ||
} | ||
@@ -100,5 +101,5 @@ return [2 /*return*/]; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var contentType, _a; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
var contentType; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
@@ -108,8 +109,5 @@ contentType = response.headers.get('Content-Type'); | ||
return [4 /*yield*/, response.json()]; | ||
case 1: return [2 /*return*/, _b.sent()]; | ||
case 2: | ||
_a = {}; | ||
return [4 /*yield*/, response.text()]; | ||
case 3: return [2 /*return*/, (_a.data = _b.sent(), | ||
_a)]; | ||
case 1: return [2 /*return*/, _a.sent()]; | ||
case 2: return [4 /*yield*/, response.text()]; | ||
case 3: return [2 /*return*/, _a.sent()]; | ||
} | ||
@@ -116,0 +114,0 @@ }); |
{ | ||
"name": "graphql-request", | ||
"version": "1.3.5-alpha", | ||
"version": "1.3.5", | ||
"main": "dist/src/index.js", | ||
@@ -5,0 +5,0 @@ "typings": "./dist/src/index.d.ts", |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
28501
0
402