From dc48906b038781e0119143a5b1ece30f1d63e1e8 Mon Sep 17 00:00:00 2001 From: Jason Kim Date: Sat, 25 Apr 2020 20:00:02 +0900 Subject: [PATCH] Replace request with isomorphic-unfetch Signed-off-by: Jason Kim --- packages/openapi-to-graphql/lib/index.js.map | 2 +- .../lib/resolver_builder.d.ts | 5 +- .../lib/resolver_builder.js | 60 ++- .../lib/resolver_builder.js.map | 2 +- .../openapi-to-graphql/lib/types/options.d.ts | 8 +- packages/openapi-to-graphql/package-lock.json | 123 ++++-- packages/openapi-to-graphql/package.json | 2 +- packages/openapi-to-graphql/src/index.ts | 4 +- .../src/resolver_builder.ts | 418 ++++++++++-------- .../openapi-to-graphql/src/types/options.ts | 9 +- 10 files changed, 376 insertions(+), 257 deletions(-) diff --git a/packages/openapi-to-graphql/lib/index.js.map b/packages/openapi-to-graphql/lib/index.js.map index 81417511..63a67437 100644 --- a/packages/openapi-to-graphql/lib/index.js.map +++ b/packages/openapi-to-graphql/lib/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;;;;;;;;;;AAsChE,6CAAmE;AAGnE,qCAA0D;AAG1D,WAAW;AACX,qDAA0D;AAC1D,yDAI2B;AAC3B,gDAA+C;AAC/C,iDAA8C;AAC9C,2CAA0C;AAC1C,iDAAoD;AACpD,iCAAyB;AAEzB,mCAAmD;AAOnD,MAAM,cAAc,GAAG,eAAK,CAAC,aAAa,CAAC,CAAA;AAE3C;;GAEG;AACH,SAAsB,mBAAmB,CACvC,IAAmC,EACnC,OAAiB;;QAEjB,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE;YAClC,OAAO,GAAG,EAAE,CAAA;SACb;QAED,0BAA0B;QAC1B,OAAO,CAAC,MAAM,GAAG,OAAO,OAAO,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM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CAAA,QAAQ,CAAA;AAAE,kCAAA,SAAS,CAAA;AAC5B,2CAAsD;AAA7C,yCAAA,oBAAoB,CAAA"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/resolver_builder.d.ts b/packages/openapi-to-graphql/lib/resolver_builder.d.ts index 82463750..68a1af14 100644 --- a/packages/openapi-to-graphql/lib/resolver_builder.d.ts +++ b/packages/openapi-to-graphql/lib/resolver_builder.d.ts @@ -1,8 +1,7 @@ -import { ConnectOptions } from './types/options'; +import { ConnectOptions, RequestOptions } from './types/options'; import { Operation } from './types/operation'; import { ResolveFunction, SubscriptionIterator } from './types/graphql'; import { PreprocessingData } from './types/preprocessing_data'; -import * as NodeRequest from 'request'; declare type GetResolverParams = { operation: Operation; argsFromLink?: { @@ -12,7 +11,7 @@ declare type GetResolverParams = { responseName?: string; data: PreprocessingData; baseUrl?: string; - requestOptions?: NodeRequest.OptionsWithUrl; + requestOptions?: RequestOptions; }; declare type GetSubscribeParams = { operation: Operation; diff --git a/packages/openapi-to-graphql/lib/resolver_builder.js b/packages/openapi-to-graphql/lib/resolver_builder.js index 1feec7d5..0fd76559 100644 --- a/packages/openapi-to-graphql/lib/resolver_builder.js +++ b/packages/openapi-to-graphql/lib/resolver_builder.js @@ -3,8 +3,20 @@ // Node module: openapi-to-graphql // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; Object.defineProperty(exports, "__esModule", { value: true }); -const NodeRequest = require("request"); +const fetchImport = require("isomorphic-unfetch"); +const fetch = (fetchImport.default || fetchImport); // Imports: const Oas3Tools = require("./oas_3_tools"); const querystring = require("querystring"); @@ -381,9 +393,10 @@ function getResolver({ operation, argsFromLink = {}, payloadName, data, baseUrl, Object.assign(options.qs, authQs); // Add authentication cookie if created if (authCookie !== null) { - const j = NodeRequest.jar(); - j.setCookie(authCookie, options.url); - options.jar = j; + if (!('cookie' in options.headers)) { + options.headers['cookie'] = ''; + } + options.headers['cookie'] += authCookie; } } // Extract OAuth token from context (if available) @@ -397,17 +410,28 @@ function getResolver({ operation, argsFromLink = {}, payloadName, data, baseUrl, } resolveData.usedRequestOptions = options; resolveData.usedStatusCode = operation.statusCode; + // remove trailing chars + if (options.headers['cookie']) { + options.headers['cookie'] = options.headers['cookie'].replace(/; ?$/, ''); + } // Make the call httpLog(`Call ${options.method.toUpperCase()} ${options.url}?${querystring.stringify(options.qs)}\n` + `headers: ${JSON.stringify(options.headers)}\n` + `request body: ${options.body}`); + const { url: resolveUrl, qs } = options, opt = __rest(options, ["url", "qs"]); return new Promise((resolve, reject) => { - NodeRequest(options, (err, response, body) => { - if (err) { - httpLog(err); - reject(err); - } - else if (response.statusCode < 200 || response.statusCode > 299) { + fetch(`${resolveUrl}?${querystring.stringify(qs)}`, opt) + .catch(err => { + httpLog(err); + reject(err); + }) + .then(response => response.text().then(body => { + response.statusCode = response.status; + const responseHeaders = Array.from(response.headers.entries()).reduce((headers, [key, value]) => { + headers[key] = value; + return headers; + }, {}); + if (response.statusCode < 200 || response.statusCode > 299) { httpLog(`${response.statusCode} - ${Oas3Tools.trim(body, 100)}`); const errorString = `Could not invoke operation ${operation.operationString}`; if (data.options.provideErrorExtensions) { @@ -434,7 +458,7 @@ function getResolver({ operation, argsFromLink = {}, payloadName, data, baseUrl, } else { httpLog(`${response.statusCode} - ${Oas3Tools.trim(body, 100)}`); - if (response.headers['content-type']) { + if (responseHeaders['content-type']) { /** * Throw warning if the non-application/json content does not * match the OAS. @@ -443,12 +467,12 @@ function getResolver({ operation, argsFromLink = {}, payloadName, data, baseUrl, * * i.e. text/plain; charset=utf-8 */ - if (!(response.headers['content-type'].includes(operation.responseContentType) || - operation.responseContentType.includes(response.headers['content-type']))) { + if (!(responseHeaders['content-type'].includes(operation.responseContentType) || + operation.responseContentType.includes(responseHeaders['content-type']))) { const errorString = `Operation ` + `${operation.operationString} ` + `should have a content-type '${operation.responseContentType}' ` + - `but has '${response.headers['content-type']}' instead`; + `but has '${responseHeaders['content-type']}' instead`; httpLog(errorString); reject(errorString); } @@ -459,7 +483,7 @@ function getResolver({ operation, argsFromLink = {}, payloadName, data, baseUrl, * content-type may not be necessarily 'application/json' it can be * 'application/json; charset=utf-8' for example */ - if (response.headers['content-type'].includes('application/json')) { + if (responseHeaders['content-type'].includes('application/json')) { let responseBody; try { responseBody = JSON.parse(body); @@ -471,7 +495,7 @@ function getResolver({ operation, argsFromLink = {}, payloadName, data, baseUrl, httpLog(errorString); reject(errorString); } - resolveData.responseHeaders = response.headers; + resolveData.responseHeaders = responseHeaders; // Deal with the fact that the server might send unsanitized data let saneData = Oas3Tools.sanitizeObjectKeys(responseBody, !data.options.simpleNames ? Oas3Tools.CaseStyle.camelCase @@ -564,7 +588,7 @@ function getResolver({ operation, argsFromLink = {}, payloadName, data, baseUrl, } } } - }); + })); }); }; } @@ -654,7 +678,7 @@ function getAuthOptions(operation, _openAPIToGraphQL, data) { authQs[security.def.name] = apiKey; } else if (security.def.in === 'cookie') { - authCookie = NodeRequest.cookie(`${security.def.name}=${apiKey}`); + authCookie = `${security.def.name}=${apiKey}; `; } } else { diff --git a/packages/openapi-to-graphql/lib/resolver_builder.js.map b/packages/openapi-to-graphql/lib/resolver_builder.js.map index f2b2deab..809e2c8b 100644 --- a/packages/openapi-to-graphql/lib/resolver_builder.js.map +++ b/packages/openapi-to-graphql/lib/resolver_builder.js.map @@ -1 +1 @@ -{"version":3,"file":"resolver_builder.js","sourceRoot":"","sources":["../src/resolver_builder.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAg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AS,aAAa,CAAC,IAAI;IACzB,OAAO,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC1C,CAAC;AAED;;;GAGG;AACH,SAAS,mBAAmB,CAAC,IAAI;IAC/B,OAAO,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC/C,CAAC;AAED;;GAEG;AACH,SAAS,sBAAsB,CAAC,IAAI;IAClC,OAAO,OAAO,IAAI,CAAC,IAAI,KAAK,WAAW;QACrC,CAAC,CAAC,IAAI,CAAC,GAAG;QACV,CAAC,CAAC;;;;;WAKC;YACH,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACzB,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;gBACpD,CAAC,CAAC,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACvC,CAAC;AAED;;GAEG;AACH,SAAS,0BAA0B,CACjC,OAAe,EACf,UAAkC;IAElC,OAAO,IAAI,sBAAY,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,CAAA;AAC5E,CAAC"} \ No newline at end of file +{"version":3,"file":"resolver_builder.js","sourceRoot":"","sources":["../src/resolver_builder.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;;;;;;;;;;;;AAgBhE,kDAAiD;AACjD,MAAM,KAAK,GAAG,CAAC,WAAW,CAAC,OAAO,IAAI,WAAW,CAA+B,CAAA;AAEhF,WAAW;AACX,2CAA0C;AAC1C,2CAA0C;AAC1C,0CAAyC;AACzC,iCAA6B;AAC7B,qCAAsC;AACtC,qDAA4C;AAC5C,iEAA8C;AAE9C,MAAM,MAAM,GAAG,IAAI,8BAAM,EAAE,CAAA;AAE3B,MAAM,cAAc,GAAG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AE,IAAI,EAAE,UAAU,CAAC,CAAA;AAC5E,CAAC"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/types/options.d.ts b/packages/openapi-to-graphql/lib/types/options.d.ts index 96971638..39b6d81d 100644 --- a/packages/openapi-to-graphql/lib/types/options.d.ts +++ b/packages/openapi-to-graphql/lib/types/options.d.ts @@ -1,4 +1,3 @@ -import * as NodeRequest from 'request'; import { ResolveFunction, ResolveObject, GraphQLOperationType } from './graphql'; /** * Type definition of the options that users can pass to OpenAPI-to-GraphQL. @@ -19,6 +18,9 @@ export declare type Report = { numMutationsCreated: number; numSubscriptionsCreated: number; }; +export declare type RequestOptions = { + [key: string]: any; +}; export declare type ConnectOptions = { [key: string]: boolean | number | string; }; @@ -126,7 +128,7 @@ export declare type Options = { * calls to the API backend. * e.g. Setup the web proxy to use. */ - requestOptions?: NodeRequest.OptionsWithUrl; + requestOptions?: RequestOptions; /** * Allows to override or add options to the PubSub connect object used to make * publish/subscribe to the API backend. @@ -329,7 +331,7 @@ export declare type InternalOptions = { * calls to the API backend. * e.g. Setup the web proxy to use. */ - requestOptions?: NodeRequest.OptionsWithUrl; + requestOptions?: RequestOptions; /** * Allows to override or add options to the PubSub connect object used to make * publish/subscribe to the API backend. diff --git a/packages/openapi-to-graphql/package-lock.json b/packages/openapi-to-graphql/package-lock.json index e27da7d7..deb0aef2 100644 --- a/packages/openapi-to-graphql/package-lock.json +++ b/packages/openapi-to-graphql/package-lock.json @@ -1,6 +1,6 @@ { "name": "openapi-to-graphql", - "version": "2.0.0", + "version": "2.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1201,6 +1201,7 @@ "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, "requires": { "safer-buffer": "~2.1.0" } @@ -1208,7 +1209,8 @@ "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true }, "assign-symbols": { "version": "1.0.0", @@ -1237,7 +1239,8 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true }, "atob": { "version": "2.1.2", @@ -1256,12 +1259,14 @@ "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true }, "aws4": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", - "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==" + "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==", + "dev": true }, "babel-jest": { "version": "25.2.6", @@ -1440,6 +1445,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, "requires": { "tweetnacl": "^0.14.3" } @@ -1710,7 +1716,8 @@ "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true }, "chalk": { "version": "2.4.2", @@ -1885,6 +1892,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, "requires": { "delayed-stream": "~1.0.0" } @@ -2067,7 +2075,8 @@ "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true }, "cosmiconfig": { "version": "6.0.0", @@ -2156,6 +2165,7 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -2316,7 +2326,8 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true }, "denque": { "version": "1.4.1", @@ -2410,6 +2421,7 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, "requires": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -3331,7 +3343,8 @@ "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true }, "extend-shallow": { "version": "3.0.2", @@ -3433,7 +3446,8 @@ "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true }, "fast-deep-equal": { "version": "1.1.0", @@ -3613,7 +3627,8 @@ "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true }, "form-data": { "version": "2.5.1", @@ -3721,6 +3736,7 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -3963,12 +3979,14 @@ "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true }, "har-validator": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "dev": true, "requires": { "ajv": "^6.5.5", "har-schema": "^2.0.0" @@ -3978,6 +3996,7 @@ "version": "6.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", + "dev": true, "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -3988,12 +4007,14 @@ "fast-deep-equal": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==" + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "dev": true }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true } } }, @@ -4137,6 +4158,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, "requires": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", @@ -4729,7 +4751,8 @@ "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true }, "is-unc-path": { "version": "1.0.0", @@ -4816,10 +4839,20 @@ } } }, + "isomorphic-unfetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.0.0.tgz", + "integrity": "sha512-V0tmJSYfkKokZ5mgl0cmfQMTb7MLHsBMngTkbLY0eXvKqiVRRoZP04Ly+KhKrJfKtzC9E6Pp15Jo+bwh7Vi2XQ==", + "requires": { + "node-fetch": "^2.2.0", + "unfetch": "^4.0.0" + } + }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true }, "istanbul-lib-coverage": { "version": "3.0.0", @@ -6444,7 +6477,8 @@ "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true }, "jsdom": { "version": "15.2.1", @@ -6514,7 +6548,8 @@ "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true }, "json-schema-traverse": { "version": "0.3.1", @@ -6530,7 +6565,8 @@ "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true }, "json-to-ast": { "version": "2.1.0", @@ -6564,6 +6600,7 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -6855,12 +6892,14 @@ "mime-db": { "version": "1.43.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", - "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==" + "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==", + "dev": true }, "mime-types": { "version": "2.1.26", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", + "dev": true, "requires": { "mime-db": "1.43.0" } @@ -7084,6 +7123,11 @@ "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, + "node-fetch": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" + }, "node-fetch-h2": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz", @@ -7264,7 +7308,8 @@ "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true }, "object-assign": { "version": "4.1.1", @@ -7602,7 +7647,8 @@ "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true }, "picomatch": { "version": "2.2.2", @@ -8019,7 +8065,8 @@ "psl": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true }, "pstree.remy": { "version": "1.1.7", @@ -8062,7 +8109,8 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true }, "qlobber": { "version": "3.1.0", @@ -8073,7 +8121,8 @@ "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true }, "range-parser": { "version": "1.2.1", @@ -8338,6 +8387,7 @@ "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -8365,6 +8415,7 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -8511,7 +8562,8 @@ "safe-buffer": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", + "dev": true }, "safe-json-stringify": { "version": "1.2.0", @@ -8530,7 +8582,8 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, "sane": { "version": "4.1.0", @@ -9182,6 +9235,7 @@ "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -9772,6 +9826,7 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, "requires": { "psl": "^1.1.28", "punycode": "^2.1.1" @@ -9928,6 +9983,7 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, "requires": { "safe-buffer": "^5.0.1" } @@ -9935,7 +9991,8 @@ "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true }, "type": { "version": "1.2.0", @@ -10033,6 +10090,11 @@ } } }, + "unfetch": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.1.0.tgz", + "integrity": "sha512-crP/n3eAPUJxZXM9T80/yv0YhkTEx2K1D3h7D1AJM6fzsWZrxdyRuLN0JH/dkZh1LNH8LxCnBzoPFCPbb2iGpg==" + }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", @@ -10161,6 +10223,7 @@ "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, "requires": { "punycode": "^2.1.0" } @@ -10201,7 +10264,8 @@ "uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true }, "v8-compile-cache": { "version": "2.1.0", @@ -10254,6 +10318,7 @@ "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, "requires": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", diff --git a/packages/openapi-to-graphql/package.json b/packages/openapi-to-graphql/package.json index dd5c7f79..035feabb 100644 --- a/packages/openapi-to-graphql/package.json +++ b/packages/openapi-to-graphql/package.json @@ -71,10 +71,10 @@ "form-urlencoded": "^4.1.1", "graphql-subscriptions": "^1.1.0", "graphql-type-json": "^0.2.1", + "isomorphic-unfetch": "^3.0.0", "jsonpath-plus": "^3.0.0", "oas-validator": "^3.1.0", "pluralize": "^8.0.0", - "request": "^2.88.0", "swagger2openapi": "^5.1.0" }, "peerDependencies": { diff --git a/packages/openapi-to-graphql/src/index.ts b/packages/openapi-to-graphql/src/index.ts index 0e8b23ca..211ebb9d 100644 --- a/packages/openapi-to-graphql/src/index.ts +++ b/packages/openapi-to-graphql/src/index.ts @@ -35,6 +35,7 @@ import { Options, InternalOptions, Report, + RequestOptions, ConnectOptions } from './types/options' import { Oas3, CallbackObject } from './types/oas3' @@ -43,7 +44,6 @@ import { Args, Field, GraphQLOperationType } from './types/graphql' import { Operation } from './types/operation' import { PreprocessingData } from './types/preprocessing_data' import { GraphQLSchema, GraphQLObjectType } from 'graphql' -import * as NodeRequest from 'request' // Imports: import { getGraphQLType, getArgs } from './schema_builder' @@ -600,7 +600,7 @@ function getFieldForOperation( operation: Operation, baseUrl: string, data: PreprocessingData, - requestOptions: NodeRequest.OptionsWithUrl, + requestOptions: RequestOptions, connectOptions: ConnectOptions ): Field { // Create GraphQL Type for response: diff --git a/packages/openapi-to-graphql/src/resolver_builder.ts b/packages/openapi-to-graphql/src/resolver_builder.ts index 49a18f9d..438bc88a 100644 --- a/packages/openapi-to-graphql/src/resolver_builder.ts +++ b/packages/openapi-to-graphql/src/resolver_builder.ts @@ -9,7 +9,7 @@ // Type imports: import { SchemaObject } from './types/oas3' -import { ConnectOptions } from './types/options' +import { ConnectOptions, RequestOptions } from './types/options' import { Operation } from './types/operation' import { ResolveFunction, @@ -17,7 +17,8 @@ import { SubscriptionIterator } from './types/graphql' import { PreprocessingData } from './types/preprocessing_data' -import * as NodeRequest from 'request' +import * as fetchImport from 'isomorphic-unfetch' +const fetch = (fetchImport.default || fetchImport) as typeof fetchImport.default // Imports: import * as Oas3Tools from './oas_3_tools' @@ -43,7 +44,7 @@ type AuthReqAndProtcolName = { type AuthOptions = { authHeaders: { [key: string]: string } authQs: { [key: string]: string } - authCookie: NodeRequest.Cookie + authCookie: string | null } type GetResolverParams = { @@ -53,7 +54,7 @@ type GetResolverParams = { responseName?: string data: PreprocessingData baseUrl?: string - requestOptions?: NodeRequest.OptionsWithUrl + requestOptions?: RequestOptions } type GetSubscribeParams = { @@ -455,7 +456,7 @@ export function getResolver({ ? operation.responseContentType : 'application/json' - let options: NodeRequest.OptionsWithUrl + let options: RequestOptions if (requestOptions) { options = { ...requestOptions } options['method'] = operation.method @@ -549,9 +550,11 @@ export function getResolver({ // Add authentication cookie if created if (authCookie !== null) { - const j = NodeRequest.jar() - j.setCookie(authCookie, options.url) - options.jar = j + if (!('cookie' in options.headers)) { + options.headers['cookie'] = '' + } + + options.headers['cookie'] += authCookie } } @@ -567,6 +570,11 @@ export function getResolver({ resolveData.usedRequestOptions = options resolveData.usedStatusCode = operation.statusCode + // remove trailing chars + if (options.headers['cookie']) { + options.headers['cookie'] = options.headers['cookie'].replace(/; ?$/, '') + } + // Make the call httpLog( `Call ${options.method.toUpperCase()} ${ @@ -576,224 +584,242 @@ export function getResolver({ `request body: ${options.body}` ) + const { url: resolveUrl, qs, ...opt } = options + return new Promise((resolve, reject) => { - NodeRequest(options, (err, response, body) => { - if (err) { + fetch(`${resolveUrl}?${querystring.stringify(qs)}`, opt) + .catch(err => { httpLog(err) reject(err) - } else if (response.statusCode < 200 || response.statusCode > 299) { - httpLog(`${response.statusCode} - ${Oas3Tools.trim(body, 100)}`) - - const errorString = `Could not invoke operation ${operation.operationString}` - - if (data.options.provideErrorExtensions) { - let responseBody - try { - responseBody = JSON.parse(body) - } catch (e) { - responseBody = body - } - - const extensions = { - method: operation.method, - path: operation.path, - - statusCode: response.statusCode, - responseHeaders: response.headers, - responseBody - } - reject(graphQLErrorWithExtensions(errorString, extensions)) - } else { - reject(new Error(errorString)) - } - - // Successful response 200-299 - } else { - httpLog(`${response.statusCode} - ${Oas3Tools.trim(body, 100)}`) - - if (response.headers['content-type']) { - /** - * Throw warning if the non-application/json content does not - * match the OAS. - * - * Use an inclusion test in case of charset - * - * i.e. text/plain; charset=utf-8 - */ - if ( - !( - response.headers['content-type'].includes( - operation.responseContentType - ) || - operation.responseContentType.includes( - response.headers['content-type'] - ) - ) - ) { - const errorString = - `Operation ` + - `${operation.operationString} ` + - `should have a content-type '${operation.responseContentType}' ` + - `but has '${response.headers['content-type']}' instead` - - httpLog(errorString) - reject(errorString) - } else { - /** - * If the response body is type JSON, then parse it - * - * content-type may not be necessarily 'application/json' it can be - * 'application/json; charset=utf-8' for example - */ - if ( - response.headers['content-type'].includes('application/json') - ) { + }) + .then(response => + response.text().then(body => { + response.statusCode = response.status + const responseHeaders = Array.from( + response.headers.entries() + ).reduce((headers, [key, value]) => { + headers[key] = value + return headers + }, {}) + + if (response.statusCode < 200 || response.statusCode > 299) { + httpLog(`${response.statusCode} - ${Oas3Tools.trim(body, 100)}`) + + const errorString = `Could not invoke operation ${operation.operationString}` + + if (data.options.provideErrorExtensions) { let responseBody try { responseBody = JSON.parse(body) } catch (e) { + responseBody = body + } + + const extensions = { + method: operation.method, + path: operation.path, + + statusCode: response.statusCode, + responseHeaders: response.headers, + responseBody + } + reject(graphQLErrorWithExtensions(errorString, extensions)) + } else { + reject(new Error(errorString)) + } + + // Successful response 200-299 + } else { + httpLog(`${response.statusCode} - ${Oas3Tools.trim(body, 100)}`) + + if (responseHeaders['content-type']) { + /** + * Throw warning if the non-application/json content does not + * match the OAS. + * + * Use an inclusion test in case of charset + * + * i.e. text/plain; charset=utf-8 + */ + if ( + !( + responseHeaders['content-type'].includes( + operation.responseContentType + ) || + operation.responseContentType.includes( + responseHeaders['content-type'] + ) + ) + ) { const errorString = - `Cannot JSON parse response body of ` + - `operation ${operation.operationString} ` + - `even though it has content-type 'application/json'` + `Operation ` + + `${operation.operationString} ` + + `should have a content-type '${operation.responseContentType}' ` + + `but has '${responseHeaders['content-type']}' instead` httpLog(errorString) reject(errorString) - } + } else { + /** + * If the response body is type JSON, then parse it + * + * content-type may not be necessarily 'application/json' it can be + * 'application/json; charset=utf-8' for example + */ + if ( + responseHeaders['content-type'].includes('application/json') + ) { + let responseBody + try { + responseBody = JSON.parse(body) + } catch (e) { + const errorString = + `Cannot JSON parse response body of ` + + `operation ${operation.operationString} ` + + `even though it has content-type 'application/json'` + + httpLog(errorString) + reject(errorString) + } - resolveData.responseHeaders = response.headers + resolveData.responseHeaders = responseHeaders - // Deal with the fact that the server might send unsanitized data - let saneData = Oas3Tools.sanitizeObjectKeys( - responseBody, - !data.options.simpleNames - ? Oas3Tools.CaseStyle.camelCase - : Oas3Tools.CaseStyle.simple - ) + // Deal with the fact that the server might send unsanitized data + let saneData = Oas3Tools.sanitizeObjectKeys( + responseBody, + !data.options.simpleNames + ? Oas3Tools.CaseStyle.camelCase + : Oas3Tools.CaseStyle.simple + ) - // Pass on _openAPIToGraphQL to subsequent resolvers - if (saneData && typeof saneData === 'object') { - if (Array.isArray(saneData)) { - saneData.forEach(element => { - if (typeof element['_openAPIToGraphQL'] === 'undefined') { - element['_openAPIToGraphQL'] = { - data: {} + // Pass on _openAPIToGraphQL to subsequent resolvers + if (saneData && typeof saneData === 'object') { + if (Array.isArray(saneData)) { + saneData.forEach(element => { + if ( + typeof element['_openAPIToGraphQL'] === 'undefined' + ) { + element['_openAPIToGraphQL'] = { + data: {} + } + } + + if ( + root && + typeof root === 'object' && + typeof root['_openAPIToGraphQL'] === 'object' + ) { + Object.assign( + element['_openAPIToGraphQL'], + root['_openAPIToGraphQL'] + ) + } + + element['_openAPIToGraphQL'].data[ + getIdentifier(info) + ] = resolveData + }) + } else { + if ( + typeof saneData['_openAPIToGraphQL'] === 'undefined' + ) { + saneData['_openAPIToGraphQL'] = { + data: {} + } } - } - if ( - root && - typeof root === 'object' && - typeof root['_openAPIToGraphQL'] === 'object' - ) { - Object.assign( - element['_openAPIToGraphQL'], - root['_openAPIToGraphQL'] - ) - } + if ( + root && + typeof root === 'object' && + typeof root['_openAPIToGraphQL'] === 'object' + ) { + Object.assign( + saneData['_openAPIToGraphQL'], + root['_openAPIToGraphQL'] + ) + } - element['_openAPIToGraphQL'].data[ - getIdentifier(info) - ] = resolveData - }) - } else { - if (typeof saneData['_openAPIToGraphQL'] === 'undefined') { - saneData['_openAPIToGraphQL'] = { - data: {} + saneData['_openAPIToGraphQL'].data[ + getIdentifier(info) + ] = resolveData } } + // Apply limit argument if ( - root && - typeof root === 'object' && - typeof root['_openAPIToGraphQL'] === 'object' + data.options.addLimitArgument && + /** + * NOTE: Does not differentiate between autogenerated args and + * preexisting args + * + * Ensure that there is not preexisting 'limit' argument + */ + !operation.parameters.find(parameter => { + return parameter.name === 'limit' + }) && + // Only array data + Array.isArray(saneData) && + // Only array of objects/arrays + saneData.some(data => { + return typeof data === 'object' + }) ) { - Object.assign( - saneData['_openAPIToGraphQL'], - root['_openAPIToGraphQL'] - ) - } - - saneData['_openAPIToGraphQL'].data[ - getIdentifier(info) - ] = resolveData - } - } - - // Apply limit argument - if ( - data.options.addLimitArgument && - /** - * NOTE: Does not differentiate between autogenerated args and - * preexisting args - * - * Ensure that there is not preexisting 'limit' argument - */ - !operation.parameters.find(parameter => { - return parameter.name === 'limit' - }) && - // Only array data - Array.isArray(saneData) && - // Only array of objects/arrays - saneData.some(data => { - return typeof data === 'object' - }) - ) { - let arraySaneData = saneData - - if ('limit' in args) { - const limit = args['limit'] - - if (limit >= 0) { - arraySaneData = arraySaneData.slice(0, limit) - } else { - reject( - new Error( - `Auto-generated 'limit' argument must be greater than or equal to 0` + let arraySaneData = saneData + + if ('limit' in args) { + const limit = args['limit'] + + if (limit >= 0) { + arraySaneData = arraySaneData.slice(0, limit) + } else { + reject( + new Error( + `Auto-generated 'limit' argument must be greater than or equal to 0` + ) + ) + } + } else { + reject( + new Error( + `Cannot get value for auto-generated 'limit' argument` + ) ) - ) + } + + saneData = arraySaneData } + + resolve(saneData) } else { - reject( - new Error( - `Cannot get value for auto-generated 'limit' argument` - ) - ) - } + // TODO: Handle YAML - saneData = arraySaneData + resolve(body) + } } - - resolve(saneData) } else { - // TODO: Handle YAML + /** + * Check to see if there is not supposed to be a response body, + * if that is the case, that would explain why there is not + * a content-type + */ + const { responseContentType } = Oas3Tools.getResponseObject( + operation, + operation.statusCode, + operation.oas + ) + if (responseContentType === null) { + resolve(null) + } else { + const errorString = + 'Response does not have a Content-Type property' - resolve(body) + httpLog(errorString) + reject(errorString) + } } } - } else { - /** - * Check to see if there is not supposed to be a response body, - * if that is the case, that would explain why there is not - * a content-type - */ - const { responseContentType } = Oas3Tools.getResponseObject( - operation, - operation.statusCode, - operation.oas - ) - if (responseContentType === null) { - resolve(null) - } else { - const errorString = - 'Response does not have a Content-Type property' - - httpLog(errorString) - reject(errorString) - } - } - } - }) + }) + ) }) } } @@ -905,7 +931,7 @@ function getAuthOptions( } else if (security.def.in === 'query') { authQs[security.def.name] = apiKey } else if (security.def.in === 'cookie') { - authCookie = NodeRequest.cookie(`${security.def.name}=${apiKey}`) + authCookie = `${security.def.name}=${apiKey}; ` } } else { throw new Error( diff --git a/packages/openapi-to-graphql/src/types/options.ts b/packages/openapi-to-graphql/src/types/options.ts index 7b1ac886..0ebfb8a1 100644 --- a/packages/openapi-to-graphql/src/types/options.ts +++ b/packages/openapi-to-graphql/src/types/options.ts @@ -4,7 +4,6 @@ // License text available at https://opensource.org/licenses/MIT // Type imports: -import * as NodeRequest from 'request' import { ResolveFunction, ResolveObject, GraphQLOperationType } from './graphql' /** @@ -28,6 +27,10 @@ export type Report = { numSubscriptionsCreated: number } +export type RequestOptions = { + [key: string]: any +} + export type ConnectOptions = { [key: string]: boolean | number | string } @@ -148,7 +151,7 @@ export type Options = { * calls to the API backend. * e.g. Setup the web proxy to use. */ - requestOptions?: NodeRequest.OptionsWithUrl + requestOptions?: RequestOptions /** * Allows to override or add options to the PubSub connect object used to make @@ -374,7 +377,7 @@ export type InternalOptions = { * calls to the API backend. * e.g. Setup the web proxy to use. */ - requestOptions?: NodeRequest.OptionsWithUrl + requestOptions?: RequestOptions /** * Allows to override or add options to the PubSub connect object used to make