diff --git a/packages/openapi-to-graphql/README.md b/packages/openapi-to-graphql/README.md index 5e0c3922..183b0776 100644 --- a/packages/openapi-to-graphql/README.md +++ b/packages/openapi-to-graphql/README.md @@ -173,10 +173,13 @@ Schema options: Resolver options: - `headers` (type: `object` | `function`, default: `{}`): Headers to be sent in every request to the API. Parameters defined in the OpenAPI Specification and set by these headers will be ignored by OpenAPI-to-GraphQL. If used as a function, the following parameters will be exposed per-request: the operation's `method`, the operation's `path`, the API `title`, and `resolverParams` (the [GraphQL resolver's parameters](https://graphql.org/learn/execution/#root-fields-resolvers)). The function should return the desired headers. +_Note: If used as a function, this will be used to modify resolvers AND the schema. For example, if a `foo` header is set, then the resolver call will append the `foo` header, and the `foo` parameter will be removed from the GraphQL schema. In `resolver_builder.ts`, the function will be called with all arguments, but in `schema_builder.ts`, only the `method`, `path`, and `title` will be provided (because `resolverParams` and `generatedRequestOptions` are only available during execution). Therefore, for query, path, header, and cookie parameters, a value must be provided without `resolverParam` and `generatedRequestOptions` or else the schema will not have the right parameters._ - `qs` (type: `object`, default: `{}`): Query parameters to be sent in every request to the API. Parameters defined in the OpenAPI Specification and set by these query parameters will be ignored by OpenAPI-to-GraphQL. -- `requestOptions` (type: `object`, default: `{}`): Additional [options](https://github.com/request/request#requestoptions-callback), provided by the [`Request` module](https://github.com/request/request), that can be used to configure the HTTP calls that powers the generated GraphQL resolvers. A common use case for this option is to set up a web proxy with the `proxy` field. Parameters defined in the OpenAPI Specification and set by this option will be ignored by OpenAPI-to-GraphQL. Additionally, the `headers` field has the feature of being used as a function. If used as a function, the following parameters will be exposed per-request: the operation's `method`, the operation's `path`, the API `title`, and `resolverParams` (the [GraphQL resolver's parameters](https://graphql.org/learn/execution/#root-fields-resolvers)). The function should return the desired headers. +- `requestOptions` (type: `object` | `function`, default: `{}`): Additional [options](https://github.com/request/request#requestoptions-callback), provided by the [`Request` module](https://github.com/request/request), that can be used to configure the HTTP calls that powers the generated GraphQL resolvers. A common use case for this option is to add headers or query string parameters to every request or to set up a web proxy with the `proxy` field. Parameters defined in the OpenAPI Specification and set by this option will be ignored by OpenAPI-to-GraphQL. If `requestOptions` is used as a function, the following parameters will be exposed per request: the operation's `method`, the operation's `path`, the API `title`, and `resolverParams` (the [GraphQL resolver's parameters](https://graphql.org/learn/execution/#root-fields-resolvers)). The function should return an [options](https://github.com/request/request#requestoptions-callback) object. _Note: If used as a function, this will be used to modify resolvers AND the schema. For example, if a `foo` header is set, then the resolver call will append the `foo` header, and the `foo` parameter will be removed from the GraphQL schema. In `resolver_builder.ts`, the function will be called with all arguments, but in `schema_builder.ts`, only the `method`, `path`, and `title` will be provided (because `resolverParams` and `generatedRequestOptions` are only available during execution). Therefore, for query, path, header, and cookie parameters, a value must be provided without `resolverParam` and `generatedRequestOptions` or else the schema will not have the right parameters._ + +- `connectOptions` (type: `object`, default: `{}`): Allows to override or add options to the PubSub connect object used to make publish/subscribe to the API backend, e.g. setup the web proxy to use. - `baseUrl` (type: `string`): Used to manually specify the base URL which all paths will be built on. Normally, OpenAPI-to-GraphQL will select a base URL from the [server object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#serverObject) defined in the OAS. However, if the server object contains multiple URLs, OpenAPI-to-GraphQL will randomly select one. The purpose of this option is to provide greater control over the base URL in these situations, especially when the OAS cannot be modified. This option may also prove to be useful in testing and development. diff --git a/packages/openapi-to-graphql/lib/index.js b/packages/openapi-to-graphql/lib/index.js index 48a9cd0b..66544206 100644 --- a/packages/openapi-to-graphql/lib/index.js +++ b/packages/openapi-to-graphql/lib/index.js @@ -45,6 +45,7 @@ const DEFAULT_OPTIONS = { headers: {}, qs: {}, requestOptions: {}, + connectOptions: {}, customResolvers: {}, customSubscriptionResolvers: {}, // Authentication options diff --git a/packages/openapi-to-graphql/lib/index.js.map b/packages/openapi-to-graphql/lib/index.js.map index 5a4bfc07..58ace32a 100644 --- a/packages/openapi-to-graphql/lib/index.js.map +++ b/packages/openapi-to-graphql/lib/index.js.map @@ -1 +1 @@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ts b/packages/openapi-to-graphql/lib/resolver_builder.d.ts index 7135e709..ae5c3115 100644 --- a/packages/openapi-to-graphql/lib/resolver_builder.d.ts +++ b/packages/openapi-to-graphql/lib/resolver_builder.d.ts @@ -11,26 +11,31 @@ import { RequestOptions } from './types/options'; import { GraphQLFieldResolver } from 'graphql'; import { IncomingHttpHeaders } from 'http'; export declare const OPENAPI_TO_GRAPHQL = "_openAPIToGraphQL"; -declare type GetResolverParams = { +declare type GetSubscribeParams = { operation: Operation; argsFromLink?: { [key: string]: string; }; payloadName?: string; - responseName?: string; data: PreprocessingData; baseUrl?: string; - requestOptions?: Partial>; + connectOptions: ConnectOptions; }; -declare type GetSubscribeParams = { +declare type GetPublishResolverParams = { + operation: Operation; + responseName?: string; + data: PreprocessingData; +}; +declare type GetResolverParams = { operation: Operation; argsFromLink?: { [key: string]: string; }; payloadName?: string; + responseName?: string; data: PreprocessingData; baseUrl?: string; - connectOptions?: ConnectOptions; + requestOptions: RequestOptions; }; declare type ResolveData = { /** @@ -61,7 +66,7 @@ declare type OpenAPIToGraphQLSource = { _openAPIToGraphQL: OpenAPIToGraphQLRoot; }; export declare function getSubscribe({ operation, payloadName, data, baseUrl, connectOptions }: GetSubscribeParams): GraphQLFieldResolver; -export declare function getPublishResolver({ operation, responseName, data }: GetResolverParams): GraphQLFieldResolver; +export declare function getPublishResolver({ operation, responseName, data }: GetPublishResolverParams): GraphQLFieldResolver; /** * If the operation type is Query or Mutation, create and return a resolver * function that performs API requests for the given GraphQL query diff --git a/packages/openapi-to-graphql/lib/resolver_builder.js b/packages/openapi-to-graphql/lib/resolver_builder.js index c19b24a9..19770204 100644 --- a/packages/openapi-to-graphql/lib/resolver_builder.js +++ b/packages/openapi-to-graphql/lib/resolver_builder.js @@ -14,6 +14,7 @@ const debug_1 = require("debug"); const graphql_1 = require("graphql"); const form_urlencoded_1 = require("form-urlencoded"); const graphql_subscriptions_1 = require("graphql-subscriptions"); +const merge = require("merge-deep"); const pubsub = new graphql_subscriptions_1.PubSub(); const translationLog = debug_1.debug('translation'); const httpLog = debug_1.debug('http'); @@ -301,46 +302,45 @@ function getResolver({ operation, argsFromLink = {}, payloadName, data, baseUrl, typeof operation.responseContentType !== 'undefined' ? operation.responseContentType : 'application/json'; - let options; - if (requestOptions) { - options = Object.assign(Object.assign({}, requestOptions), { method: operation.method, url // Must be after the requestOptions spread as url is a mandatory field so undefined may be used - }); - options.headers = {}; // Handle requestOptions.header later if applicable - options.qs = {}; // Handle requestOptions.qs later if applicable - if (requestOptions.headers) { - // requestOptions.headers may be either an object or a function - if (typeof requestOptions.headers === 'object') { - Object.assign(options.headers, headers, requestOptions.headers); - } - else if (typeof requestOptions.headers === 'function') { - const headers = requestOptions.headers(method, path, title, { - source, - args, - context, - info - }); - if (typeof headers === 'object') { - Object.assign(options.headers, headers, headers); - } - } - } - else { - options.headers = headers; - } - if (requestOptions.qs) { - Object.assign(options.qs, qs, requestOptions.qs); - } - else { - options.qs = qs; + // Add `headers` option: + if (typeof data.options.headers === 'object') { + Object.assign(headers, data.options.headers); + } + else if (typeof data.options.headers === 'function') { + Object.assign(headers, data.options.headers(method, path, title, { + source, + args, + context, + info + })); + } + // Add `qs` option: + if (typeof data.options.qs === 'object') { + Object.assign(qs, data.options.qs); + } + // Get authentication headers and query string parameters + let cookieJar; + if (source && + typeof source === 'object' && + typeof source[exports.OPENAPI_TO_GRAPHQL] === 'object') { + const { authHeaders, authQs, authCookie } = getAuthOptions(operation, source[exports.OPENAPI_TO_GRAPHQL], data); + // ...and add them + Object.assign(headers, authHeaders); + Object.assign(qs, authQs); + // Add authentication cookie if created + if (authCookie !== null) { + cookieJar = NodeRequest.jar(); + cookieJar.setCookie(authCookie, url); } } + // Extract OAuth token from context (if available) + if (data.options.sendOAuthTokenInQuery) { + const oAuthQueryObj = createOAuthQS(data, context); + Object.assign(qs, oAuthQueryObj); + } else { - options = { - method: operation.method, - url, - headers, - qs - }; + const oAuthHeader = createOAuthHeader(data, context); + Object.assign(headers, oAuthHeader); } /** * Determine possible payload @@ -348,75 +348,44 @@ function getResolver({ operation, argsFromLink = {}, payloadName, data, baseUrl, * GraphQL produces sanitized payload names, so we have to sanitize before * lookup here */ - resolveData.usedPayload = undefined; + let payload; if (typeof payloadName === 'string') { - // The option genericPayloadArgName will change the payload name to "requestBody" + // The option `genericPayloadArgName` will change the payload name to "requestBody" const sanePayloadName = data.options.genericPayloadArgName ? 'requestBody' : Oas3Tools.sanitize(payloadName, Oas3Tools.CaseStyle.camelCase); - let rawPayload; if (operation.payloadContentType === 'application/json') { - rawPayload = JSON.stringify(Oas3Tools.desanitizeObjectKeys(args[sanePayloadName], data.saneMap)); + payload = JSON.stringify(Oas3Tools.desanitizeObjectKeys(args[sanePayloadName], data.saneMap)); } else if (operation.payloadContentType === 'application/x-www-form-urlencoded') { - rawPayload = form_urlencoded_1.default(Oas3Tools.desanitizeObjectKeys(args[sanePayloadName], data.saneMap)); + payload = form_urlencoded_1.default(Oas3Tools.desanitizeObjectKeys(args[sanePayloadName], data.saneMap)); } else { // Payload is not an object - rawPayload = args[sanePayloadName]; - } - options.body = rawPayload; - resolveData.usedPayload = rawPayload; - } - /** - * Pass on OpenAPI-to-GraphQL options - */ - if (typeof data.options === 'object') { - // Headers: - if (typeof data.options.headers === 'object') { - Object.assign(options.headers, data.options.headers); - } - else if (typeof data.options.headers === 'function') { - const headers = data.options.headers(method, path, title, { - source, - args, - context, - info - }); - if (typeof headers === 'object') { - Object.assign(options.headers, headers); - } - } - // Query string: - if (typeof data.options.qs === 'object') { - Object.assign(options.qs, data.options.qs); - } - } - // Get authentication headers and query parameters - if (source && - typeof source === 'object' && - typeof source[exports.OPENAPI_TO_GRAPHQL] === 'object') { - const { authHeaders, authQs, authCookie } = getAuthOptions(operation, source[exports.OPENAPI_TO_GRAPHQL], data); - // ...and pass them to the options - Object.assign(options.headers, authHeaders); - 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; + payload = args[sanePayloadName]; } } - // Extract OAuth token from context (if available) - if (data.options.sendOAuthTokenInQuery) { - const oauthQueryObj = createOAuthQS(data, context); - Object.assign(options.qs, oauthQueryObj); - } - else { - const oauthHeader = createOAuthHeader(data, context); - Object.assign(options.headers, oauthHeader); + let options = { + method: operation.method, + url, + headers, + qs, + body: payload, + jar: cookieJar // For authentication cookies + }; + // The options `requestOptions` will finalize the options + if (requestOptions) { + /** + * If requestOptions is a function, the run the function, otherwise, + * use the original value + */ + const requestOptionsValue = typeof requestOptions === 'function' + ? requestOptions(method, path, title, { source, args, context, info }, options) + : requestOptions; + options = merge(options, requestOptionsValue); } resolveData.usedRequestOptions = options; + resolveData.usedPayload = payload; resolveData.usedStatusCode = operation.statusCode; // Make the call httpLog(`Call ${options.method.toUpperCase()} ${options.url}?${querystring.stringify(options.qs)}\n` + diff --git a/packages/openapi-to-graphql/lib/resolver_builder.js.map b/packages/openapi-to-graphql/lib/resolver_builder.js.map index 76411bac..97de0344 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,gEAAgE;;;AAYhE,uCAAsC;AAGtC,WAAW;AACX,2CAA0C;AAC1C,2CAA0C;AAC1C,0CAAyC;AACzC,iCAA6B;AAC7B,qCAA4D;AAC5D,qDAA4C;AAC5C,iEAA8C;AAG9C,MAAM,MAAM,GAAG,IAAI,8BAAM,EAAE,CAAA;AAE3B,MAAM,cAAc,GAAG,aAAK,CAAC,aAAa,CAAC,CAAA;AAC3C,MAAM,OAAO,GAAG,aAAK,CAAC,MAAM,CAAC,CAAA;AAC7B,MAAM,SAAS,GAAG,aAAK,CAAC,QAAQ,CAAC,CAAA;AAEjC,6CAA6C;AAC7C,MAAM,k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CAAC,SAAS,CAAC,SAAS;YAC/B,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAC/B,CAAA;QAED,IAAI,aAAa,IAAI,aAAa,IAAI,IAAI,EAAE;YAC1C,QAAQ,KAAK,CAAC,EAAE,EAAE;gBAChB,kBAAkB;gBAClB,KAAK,MAAM;oBACT,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,IAAI,GAAG,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAA;oBAC3D,MAAK;gBAEP,mBAAmB;gBACnB,KAAK,OAAO;oBACV,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,CAAA;oBACpC,MAAK;gBAEP,oBAAoB;gBACpB,KAAK,QAAQ;oBACX,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,CAAA;oBACzC,MAAK;gBAEP,oBAAoB;gBACpB,KAAK,QAAQ;oBACX,IAAI,CAAC,CAAC,QAAQ,IAAI,OAAO,CAAC,EAAE;wBAC1B,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAA;qBACvB;oBAED,OAAO,CAAC,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAA;oBAC7D,MAAK;gBAEP;oBACE,OAAO,CACL,oCAAoC,KAAK,CAAC,EAAE,WAAW;wBACrD,cAAc,KAAK,CAAC,IAAI,mBAAmB,IAAI,WAAW;wBAC1D,WAAW,CACd,CAAA;aACJ;SACF;KACF;IAED,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,CAAA;AAC9B,CAAC;AA3DD,gEA2DC"} \ 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,gEAA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OAAO,CAAC,EAAE;wBAC1B,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAA;qBACvB;oBAED,OAAO,CAAC,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAA;oBAC7D,MAAK;gBAEP;oBACE,OAAO,CACL,oCAAoC,KAAK,CAAC,EAAE,WAAW;wBACrD,cAAc,KAAK,CAAC,IAAI,mBAAmB,IAAI,WAAW;wBAC1D,WAAW,CACd,CAAA;aACJ;SACF;KACF;IAED,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,CAAA;AAC9B,CAAC;AA3DD,gEA2DC"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/schema_builder.js b/packages/openapi-to-graphql/lib/schema_builder.js index 695e12b7..8afd3f16 100644 --- a/packages/openapi-to-graphql/lib/schema_builder.js +++ b/packages/openapi-to-graphql/lib/schema_builder.js @@ -757,54 +757,44 @@ function linkOpRefToOpId({ links, linkKey, operation, data }) { } } /** - * Determin if an argument should be created if the argument has already been + * Determine if an argument should be created if the argument has already been * provided through the options */ -function skipArg(parameter, operation, data) { - if (typeof data.options === 'object') { - switch (parameter.in) { - case 'header': - // Check header option - if (typeof data.options.headers === 'object' && - parameter.name in data.options.headers) { - return true; - } - else if (typeof data.options.headers === 'function') { - const headers = data.options.headers(operation.method, operation.path, operation.oas.info.title); - if (typeof headers === 'object') { - return true; - } - // Check requestOptions option - } - else if (typeof data.options.requestOptions === 'object') { - if (typeof data.options.requestOptions.headers === 'object' && - parameter.name in data.options.requestOptions.headers) { - return true; - } - else if (typeof data.options.requestOptions.headers === 'function') { - const headers = data.options.requestOptions.headers(operation.method, operation.path, operation.oas.info.title); - if (typeof headers === 'object') { - return true; - } - } - } - break; - case 'query': - // Check header option - if (typeof data.options.qs === 'object' && - parameter.name in data.options.qs) { - return true; - // Check requestOptions option - } - else if (typeof data.options.requestOptions === 'object' && - typeof data.options.requestOptions.qs === 'object' && - parameter.name in data.options.requestOptions.qs) { - return true; - } - break; - } +function shouldSkipArgumentBecauseOptions(parameter, operation, data) { + // Get the value of `requestOptions` as it can be both an object or a function + const requestOptionsValue = typeof data.options.requestOptions === 'object' + ? data.options.requestOptions + : typeof data.options.requestOptions === 'function' + ? data.options.requestOptions(operation.method, operation.path, operation.oas.info.title) + : undefined; + switch (parameter.in) { + case 'header': + /** + * Get headers from `requestOptions` if possible + * + * Otherwise, get headers from `headers` if possible + */ + const headers = requestOptionsValue && 'headers' in requestOptionsValue + ? requestOptionsValue.headers + : typeof data.options.headers === 'object' + ? data.options.headers + : typeof data.options.headers === 'function' + ? data.options.headers(operation.method, operation.path, operation.oas.info.title) + : undefined; + return headers && parameter.name in headers; + case 'query': + /** + * Get qs from `requestOptions` if possible + * + * Otherwise, get query strings from `qs` if possible + */ + const qs = requestOptionsValue && 'qs' in requestOptionsValue + ? requestOptionsValue.qs + : typeof data.options.qs === 'object' + ? data.options.qs + : undefined; + return qs && parameter.name in qs; } - return false; } /** * Creates the arguments for resolving a field @@ -827,7 +817,7 @@ function getArgs({ requestPayloadDef, parameters, operation, data }) { return; } // If this parameter is provided via options, ignore - if (skipArg(parameter, operation, data)) { + if (shouldSkipArgumentBecauseOptions(parameter, operation, data)) { return; } /** diff --git a/packages/openapi-to-graphql/lib/schema_builder.js.map b/packages/openapi-to-graphql/lib/schema_builder.js.map index 3322dd34..5f774f9c 100644 --- a/packages/openapi-to-graphql/lib/schema_builder.js.map +++ b/packages/openapi-to-graphql/lib/schema_builder.js.map @@ -1 +1 @@ -{"version":3,"file":"schema_builder.js","sourceRoot":"","sources":["../src/schema_builder.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;;AAiBhE,qCAiBgB;AAEhB,WAAW;AACX,yDAA2C;AAC3C,2CAA0C;AAC1C,yDAAoE;AACpE,iDAA8C;AAC9C,iCAAyB;AACzB,mCAAoE;AAsCp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;YACvC,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC7B,eAAe;gBACf,OAAO,YAAY,CAAC,CAAC,CAAC,CAAA;aACvB;iBAAM,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;gBAClC,iBAAiB;gBACjB,qBAAa,CAAC;oBACZ,cAAc,EAAE,uBAAe,CAAC,cAAc;oBAC9C,OAAO,EACL,qBAAqB,IAAI,CAAC,YAAY,kBAAkB;wBACxD,QAAQ,YAAY,0CAA0C;oBAChE,IAAI;oBACJ,GAAG,EAAE,cAAc;iBACpB,CAAC,CAAA;aACH;iBAAM;gBACL,gCAAgC;gBAChC,qBAAa,CAAC;oBACZ,cAAc,EAAE,uBAAe,CAAC,iBAAiB;oBACjD,OAAO,EACL,qBAAqB,IAAI,CAAC,YAAY,kBAAkB;wBACxD,QAAQ,YAAY,gCAAgC;oBACtD,IAAI;oBACJ,GAAG,EAAE,cAAc;iBACpB,CAAC,CAAA;aACH;YACD,MAAK;QAEP,UAAU;QACV,cAAc;QACd,UAAU;QAEV,UAAU;QACV,eAAe;QACf,UAAU;QAEV,iCAAiC;QACjC,gCAAgC;QAChC;YACE,qBAAa,CAAC;gBACZ,cAAc,EAAE,uBAAe,CAAC,iBAAiB;gBACjD,OAAO,EACL,wCAAwC;oBACxC,IAAI,IAAI,CAAC,YAAY,gCAAgC;oBACrD,kDAAkD;gBACpD,IAAI;gBACJ,GAAG,EAAE,cAAc;aACpB,CAAC,CAAA;KACL;AACH,CAAC"} \ No newline at end of file +{"version":3,"file":"schema_builder.js","sourceRoot":"","sources":["../src/schema_builder.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;;AAiBhE,qCAiBgB;AAEhB,WAAW;AACX,yDAA2C;AAC3C,2CAA0C;AAC1C,yDAAoE;AACpE,iDAA8C;AAC9C,iCAAyB;AACzB,mCAAoE;AAsCpE;;;;;;GAMG;AACH,MAAM,gBAA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Aa,CAAC;oBACZ,cAAc,EAAE,uBAAe,CAAC,iBAAiB;oBACjD,OAAO,EACL,qBAAqB,IAAI,CAAC,YAAY,kBAAkB;wBACxD,QAAQ,YAAY,gCAAgC;oBACtD,IAAI;oBACJ,GAAG,EAAE,cAAc;iBACpB,CAAC,CAAA;aACH;YACD,MAAK;QAEP,UAAU;QACV,cAAc;QACd,UAAU;QAEV,UAAU;QACV,eAAe;QACf,UAAU;QAEV,iCAAiC;QACjC,gCAAgC;QAChC;YACE,qBAAa,CAAC;gBACZ,cAAc,EAAE,uBAAe,CAAC,iBAAiB;gBACjD,OAAO,EACL,wCAAwC;oBACxC,IAAI,IAAI,CAAC,YAAY,gCAAgC;oBACrD,kDAAkD;gBACpD,IAAI;gBACJ,GAAG,EAAE,cAAc;aACpB,CAAC,CAAA;KACL;AACH,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 898c1d53..3be617b7 100644 --- a/packages/openapi-to-graphql/lib/types/options.d.ts +++ b/packages/openapi-to-graphql/lib/types/options.d.ts @@ -36,6 +36,23 @@ export declare type Headers = { /** * Given a set parameters corresponding to a specific operation in the OAS, * provide the appropriate headers + * + * NOTE: This will be used to modify resolvers AND the schema. For example, if + * a `foo` header is set, then the resolver call will append the `foo` header, + * and the `foo` parameter will be removed from the GraphQL schema. In + * resolver_builder.ts, the function will be called with all arguments, but in + * schema_builder.ts, only the `method`, `path`, and `title` will be provided + * (because `resolverParams` and `generatedRequestOptions` are only available + * during execution). Therefore, for query, path, header, and cookie parameters, + * a value must be provided without `resolverParam` and + * `generatedRequestOptions` or else the schema will not have the right + * parameters. + * + * @param method HTTP method of the operation + * @param path HTTP path of the operation + * @param title Title of the OAS (useful for multi-OAS input) + * @param resolverParams Optional. Resolver parameters. The parameter names will be + * sanitized. Refer to the `saneMap` in the `PreprocessingData` for mapping. */ export declare type RequestHeadersFunction = (method: string, path: string, title: string, resolverParams?: { source: TSource; @@ -44,18 +61,35 @@ export declare type RequestHeadersFunction = (method: info: GraphQLResolveInfo; }) => Headers; /** - * We rely on the Request library in order to make resolver API calls. - * - * We expose the options so that users can have more control over the calls. + * Given a set parameters corresponding to a specific operation in the OAS as + * well as the resolver parameters, provide the appropriate Request options * - * We modify the RequestOptions so that headers can also be provided as a - * function. + * NOTE: This will be used to modify resolvers AND the schema. For example, if + * a `foo` header is set, then the resolver call will append the `foo` header, + * and the `foo` parameter will be removed from the GraphQL schema. In + * resolver_builder.ts, the function will be called with all arguments, but in + * schema_builder.ts, only the `method`, `path`, and `title` will be provided + * (because `resolverParams` and `generatedRequestOptions` are only available + * during execution). Therefore, for query, path, header, and cookie parameters, + * a value must be provided without `resolverParam` and + * `generatedRequestOptions` or else the schema will not have the right + * parameters. * - * Based on: https://github.com/request/request#requestoptions-callback + * @param method HTTP method of the operation + * @param path HTTP path of the operation + * @param title Title of the OAS (useful for multi-OAS input) + * @param resolverParams Optional. Resolver parameters. The parameter names will be + * sanitized. Refer to the `saneMap` in the `PreprocessingData` for mapping. + * @param generatedRequestOptions Optional. The generated Request options that + * would otherwise be used. */ -export declare type RequestOptions = Omit & { - headers?: Headers | RequestHeadersFunction; -}; +export declare type RequestOptionsFunction = (method: string, path: string, title: string, resolverParams?: { + source: TSource; + args: TArgs; + context: TContext; + info: GraphQLResolveInfo; +}, generatedRequestOptions?: NodeRequest.OptionsWithUrl) => Partial; +export declare type RequestOptions = Partial | RequestOptionsFunction; export declare type Options = Partial>; export declare type InternalOptions = { strict: boolean; @@ -97,7 +131,7 @@ export declare type InternalOptions = { * into a GraphQL ID type. To allow for more customzation, this option allows * users to specify other formats that should be interpreted as ID types. */ - idFormats?: string[]; + idFormats: string[]; /** * Allows to define the root operation type (Query or Mutation type) of any * OAS operation explicitly. @@ -108,7 +142,7 @@ export declare type InternalOptions = { * The field is identifed first by the title of the OAS, then the path of the * operation, and lastly the method of the operation. */ - selectQueryOrMutationField?: OasTitlePathMethodObject; + selectQueryOrMutationField: OasTitlePathMethodObject; /** * Sets argument name for the payload of a mutation to 'requestBody' */ @@ -157,11 +191,11 @@ export declare type InternalOptions = { /** * Custom headers to send with every request made by a resolve function. */ - headers?: Headers | RequestHeadersFunction; + headers: Headers | RequestHeadersFunction; /** * Custom query parameters to send with every reqeust by a resolve function. */ - qs?: { + qs: { [key: string]: string; }; /** @@ -171,18 +205,19 @@ export declare type InternalOptions = { * proxy to use. * * Headers can either be provided as an object or a function that returns - * an object. + * a Request library options object. * * Based on: https://github.com/request/request#requestoptions-callback */ - requestOptions?: Partial>; + requestOptions: RequestOptions; /** * Allows to override or add options to the PubSub connect object used to make - * publish/subscribe to the API backend. - * e.g. Setup the web proxy to use. + * publish/subscribe to the API backend, e.g. setup the web proxy to use. */ - connectOptions?: ConnectOptions; + connectOptions: ConnectOptions; /** + * Optional + * * Specifies the URL on which all paths will be based on. * Overrides the server object in the OAS. */ @@ -202,7 +237,7 @@ export declare type InternalOptions = { * implementing performance improvements like caching, or dealing with * non-standard authentication requirements. */ - customResolvers?: OasTitlePathMethodObject>; + customResolvers: OasTitlePathMethodObject>; /** * Allows to define custom resolvers and subscribe functions for fields on the * Subscription root operation type. @@ -221,7 +256,7 @@ export declare type InternalOptions = { * Note: Subscription fields will only be generated if the * createSubscriptionsFromCallbacks option is enabled. */ - customSubscriptionResolvers?: OasTitlePathMethodObject<{ + customSubscriptionResolvers: OasTitlePathMethodObject<{ subscribe: GraphQLFieldResolver; resolve: GraphQLFieldResolver; }>; diff --git a/packages/openapi-to-graphql/package-lock.json b/packages/openapi-to-graphql/package-lock.json index caab8d84..15e76adf 100644 --- a/packages/openapi-to-graphql/package-lock.json +++ b/packages/openapi-to-graphql/package-lock.json @@ -1805,8 +1805,7 @@ "arr-union": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" }, "array-differ": { "version": "3.0.0", @@ -2533,6 +2532,28 @@ } } }, + "clone-deep": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.2.4.tgz", + "integrity": "sha1-TnPdCen7lxzDhnDF3O2cGJZIHMY=", + "requires": { + "for-own": "^0.1.3", + "is-plain-object": "^2.0.1", + "kind-of": "^3.0.2", + "lazy-cache": "^1.0.3", + "shallow-clone": "^0.1.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "cluster-key-slot": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.0.tgz", @@ -4401,8 +4422,15 @@ "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "requires": { + "for-in": "^1.0.1" + } }, "foreach": { "version": "2.0.5", @@ -5274,8 +5302,7 @@ "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-callable": { "version": "1.1.5", @@ -5345,8 +5372,7 @@ "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" }, "is-extglob": { "version": "2.1.1", @@ -5432,7 +5458,6 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, "requires": { "isobject": "^3.0.1" } @@ -5568,8 +5593,7 @@ "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" }, "isomorphic-git": { "version": "1.7.8", @@ -8520,6 +8544,11 @@ "package-json": "^4.0.0" } }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + }, "leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -8697,6 +8726,26 @@ "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", "dev": true }, + "merge-deep": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/merge-deep/-/merge-deep-3.0.3.tgz", + "integrity": "sha512-qtmzAS6t6grwEkNrunqTBdn0qKwFgNWvlxUbAV8es9M7Ot1EbyApytCnvE0jALPa46ZpKDUo527kKiaWplmlFA==", + "requires": { + "arr-union": "^3.1.0", + "clone-deep": "^0.2.4", + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -8801,6 +8850,22 @@ } } }, + "mixin-object": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", + "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", + "requires": { + "for-in": "^0.1.3", + "is-extendable": "^0.1.1" + }, + "dependencies": { + "for-in": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", + "integrity": "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=" + } + } + }, "mkdirp": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", @@ -10903,6 +10968,32 @@ "safe-buffer": "^5.0.1" } }, + "shallow-clone": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz", + "integrity": "sha1-WQnodLp3EG1zrEFM/sH/yofZcGA=", + "requires": { + "is-extendable": "^0.1.1", + "kind-of": "^2.0.1", + "lazy-cache": "^0.2.3", + "mixin-object": "^2.0.1" + }, + "dependencies": { + "kind-of": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", + "integrity": "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=", + "requires": { + "is-buffer": "^1.0.2" + } + }, + "lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" + } + } + }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", diff --git a/packages/openapi-to-graphql/package.json b/packages/openapi-to-graphql/package.json index 707ae512..d120e3dd 100644 --- a/packages/openapi-to-graphql/package.json +++ b/packages/openapi-to-graphql/package.json @@ -73,6 +73,7 @@ "graphql-type-json": "^0.3.2", "json-ptr": "^1.3.1", "jsonpath-plus": "^4.0.0", + "merge-deep": "^3.0.3", "oas-validator": "^5.0.2", "pluralize": "^8.0.0", "request": "^2.88.0", diff --git a/packages/openapi-to-graphql/src/index.ts b/packages/openapi-to-graphql/src/index.ts index 514f5b9b..4e903baa 100644 --- a/packages/openapi-to-graphql/src/index.ts +++ b/packages/openapi-to-graphql/src/index.ts @@ -108,6 +108,7 @@ const DEFAULT_OPTIONS: InternalOptions = { headers: {}, qs: {}, requestOptions: {}, + connectOptions: {}, customResolvers: {}, customSubscriptionResolvers: {}, @@ -640,7 +641,7 @@ function getFieldForOperation( operation: Operation, baseUrl: string, data: PreprocessingData, - requestOptions: Partial>, + requestOptions: RequestOptions, connectOptions: ConnectOptions ): GraphQLFieldConfig { // 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 2c4a88e5..7aae0344 100644 --- a/packages/openapi-to-graphql/src/resolver_builder.ts +++ b/packages/openapi-to-graphql/src/resolver_builder.ts @@ -25,6 +25,7 @@ import { GraphQLError, GraphQLFieldResolver } from 'graphql' import formurlencoded from 'form-urlencoded' import { PubSub } from 'graphql-subscriptions' import { IncomingHttpHeaders } from 'http' +import * as merge from 'merge-deep' const pubsub = new PubSub() @@ -50,23 +51,29 @@ type AuthOptions = { authCookie: NodeRequest.Cookie } -type GetResolverParams = { +type GetSubscribeParams = { operation: Operation argsFromLink?: { [key: string]: string } payloadName?: string - responseName?: string data: PreprocessingData baseUrl?: string - requestOptions?: Partial> + connectOptions: ConnectOptions } -type GetSubscribeParams = { +type GetPublishResolverParams = { + operation: Operation + responseName?: string + data: PreprocessingData +} + +type GetResolverParams = { operation: Operation argsFromLink?: { [key: string]: string } payloadName?: string + responseName?: string data: PreprocessingData baseUrl?: string - connectOptions?: ConnectOptions + requestOptions: RequestOptions } type ResolveData = { @@ -237,7 +244,7 @@ export function getPublishResolver({ operation, responseName, data -}: GetResolverParams): GraphQLFieldResolver< +}: GetPublishResolverParams): GraphQLFieldResolver< TSource, TContext, TArgs @@ -508,49 +515,57 @@ export function getResolver({ ? operation.responseContentType : 'application/json' - let options: NodeRequest.OptionsWithUrl - if (requestOptions) { - options = { - ...requestOptions, - method: operation.method, - url // Must be after the requestOptions spread as url is a mandatory field so undefined may be used - } + // Add `headers` option: + if (typeof data.options.headers === 'object') { + Object.assign(headers, data.options.headers) + } else if (typeof data.options.headers === 'function') { + Object.assign( + headers, + data.options.headers(method, path, title, { + source, + args, + context, + info + }) + ) + } - options.headers = {} // Handle requestOptions.header later if applicable - options.qs = {} // Handle requestOptions.qs later if applicable - - if (requestOptions.headers) { - // requestOptions.headers may be either an object or a function - if (typeof requestOptions.headers === 'object') { - Object.assign(options.headers, headers, requestOptions.headers) - } else if (typeof requestOptions.headers === 'function') { - const headers = requestOptions.headers(method, path, title, { - source, - args, - context, - info - }) - - if (typeof headers === 'object') { - Object.assign(options.headers, headers, headers) - } - } - } else { - options.headers = headers - } + // Add `qs` option: + if (typeof data.options.qs === 'object') { + Object.assign(qs, data.options.qs) + } - if (requestOptions.qs) { - Object.assign(options.qs, qs, requestOptions.qs) - } else { - options.qs = qs + // Get authentication headers and query string parameters + let cookieJar + if ( + source && + typeof source === 'object' && + typeof source[OPENAPI_TO_GRAPHQL] === 'object' + ) { + const { authHeaders, authQs, authCookie } = getAuthOptions( + operation, + source[OPENAPI_TO_GRAPHQL], + data + ) + + // ...and add them + Object.assign(headers, authHeaders) + Object.assign(qs, authQs) + + // Add authentication cookie if created + if (authCookie !== null) { + cookieJar = NodeRequest.jar() + cookieJar.setCookie(authCookie, url) } + } + + // Extract OAuth token from context (if available) + if (data.options.sendOAuthTokenInQuery) { + const oAuthQueryObj = createOAuthQS(data, context) + Object.assign(qs, oAuthQueryObj) } else { - options = { - method: operation.method, - url, - headers, - qs - } + const oAuthHeader = createOAuthHeader(data, context) + Object.assign(headers, oAuthHeader) } /** @@ -559,92 +574,60 @@ export function getResolver({ * GraphQL produces sanitized payload names, so we have to sanitize before * lookup here */ - resolveData.usedPayload = undefined + let payload if (typeof payloadName === 'string') { - // The option genericPayloadArgName will change the payload name to "requestBody" + // The option `genericPayloadArgName` will change the payload name to "requestBody" const sanePayloadName = data.options.genericPayloadArgName ? 'requestBody' : Oas3Tools.sanitize(payloadName, Oas3Tools.CaseStyle.camelCase) - let rawPayload if (operation.payloadContentType === 'application/json') { - rawPayload = JSON.stringify( + payload = JSON.stringify( Oas3Tools.desanitizeObjectKeys(args[sanePayloadName], data.saneMap) ) } else if ( operation.payloadContentType === 'application/x-www-form-urlencoded' ) { - rawPayload = formurlencoded( + payload = formurlencoded( Oas3Tools.desanitizeObjectKeys(args[sanePayloadName], data.saneMap) ) } else { // Payload is not an object - rawPayload = args[sanePayloadName] + payload = args[sanePayloadName] } - options.body = rawPayload - resolveData.usedPayload = rawPayload } - /** - * Pass on OpenAPI-to-GraphQL options - */ - if (typeof data.options === 'object') { - // Headers: - if (typeof data.options.headers === 'object') { - Object.assign(options.headers, data.options.headers) - } else if (typeof data.options.headers === 'function') { - const headers = data.options.headers(method, path, title, { - source, - args, - context, - info - }) - - if (typeof headers === 'object') { - Object.assign(options.headers, headers) - } - } - - // Query string: - if (typeof data.options.qs === 'object') { - Object.assign(options.qs, data.options.qs) - } + let options: NodeRequest.OptionsWithUrl = { + method: operation.method, + url, + headers, + qs, + body: payload, + jar: cookieJar // For authentication cookies } - // Get authentication headers and query parameters - if ( - source && - typeof source === 'object' && - typeof source[OPENAPI_TO_GRAPHQL] === 'object' - ) { - const { authHeaders, authQs, authCookie } = getAuthOptions( - operation, - source[OPENAPI_TO_GRAPHQL], - data - ) - - // ...and pass them to the options - Object.assign(options.headers, authHeaders) - 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 - } - } + // The options `requestOptions` will finalize the options + if (requestOptions) { + /** + * If requestOptions is a function, the run the function, otherwise, + * use the original value + */ + const requestOptionsValue = + typeof requestOptions === 'function' + ? requestOptions( + method, + path, + title, + { source, args, context, info }, + options + ) + : requestOptions - // Extract OAuth token from context (if available) - if (data.options.sendOAuthTokenInQuery) { - const oauthQueryObj = createOAuthQS(data, context) - Object.assign(options.qs, oauthQueryObj) - } else { - const oauthHeader = createOAuthHeader(data, context) - Object.assign(options.headers, oauthHeader) + options = merge(options, requestOptionsValue) } resolveData.usedRequestOptions = options + resolveData.usedPayload = payload resolveData.usedStatusCode = operation.statusCode // Make the call diff --git a/packages/openapi-to-graphql/src/schema_builder.ts b/packages/openapi-to-graphql/src/schema_builder.ts index 89f7f601..ce60fcab 100644 --- a/packages/openapi-to-graphql/src/schema_builder.ts +++ b/packages/openapi-to-graphql/src/schema_builder.ts @@ -1026,80 +1026,63 @@ function linkOpRefToOpId({ } /** - * Determin if an argument should be created if the argument has already been + * Determine if an argument should be created if the argument has already been * provided through the options */ -function skipArg( +function shouldSkipArgumentBecauseOptions( parameter: ParameterObject, operation: Operation, data: PreprocessingData ): boolean { - if (typeof data.options === 'object') { - switch (parameter.in) { - case 'header': - // Check header option - if ( - typeof data.options.headers === 'object' && - parameter.name in data.options.headers - ) { - return true - } else if (typeof data.options.headers === 'function') { - const headers = data.options.headers( - operation.method, - operation.path, - operation.oas.info.title - ) - - if (typeof headers === 'object') { - return true - } + // Get the value of `requestOptions` as it can be both an object or a function + const requestOptionsValue = + typeof data.options.requestOptions === 'object' + ? data.options.requestOptions + : typeof data.options.requestOptions === 'function' + ? data.options.requestOptions( + operation.method, + operation.path, + operation.oas.info.title + ) + : undefined - // Check requestOptions option - } else if (typeof data.options.requestOptions === 'object') { - if ( - typeof data.options.requestOptions.headers === 'object' && - parameter.name in data.options.requestOptions.headers - ) { - return true - } else if ( - typeof data.options.requestOptions.headers === 'function' - ) { - const headers = data.options.requestOptions.headers( + switch (parameter.in) { + case 'header': + /** + * Get headers from `requestOptions` if possible + * + * Otherwise, get headers from `headers` if possible + */ + const headers = + requestOptionsValue && 'headers' in requestOptionsValue + ? requestOptionsValue.headers + : typeof data.options.headers === 'object' + ? data.options.headers + : typeof data.options.headers === 'function' + ? data.options.headers( operation.method, operation.path, operation.oas.info.title ) + : undefined - if (typeof headers === 'object') { - return true - } - } - } + return headers && parameter.name in headers - break - - case 'query': - // Check header option - if ( - typeof data.options.qs === 'object' && - parameter.name in data.options.qs - ) { - return true - - // Check requestOptions option - } else if ( - typeof data.options.requestOptions === 'object' && - typeof data.options.requestOptions.qs === 'object' && - parameter.name in data.options.requestOptions.qs - ) { - return true - } - - break - } + case 'query': + /** + * Get qs from `requestOptions` if possible + * + * Otherwise, get query strings from `qs` if possible + */ + const qs = + requestOptionsValue && 'qs' in requestOptionsValue + ? requestOptionsValue.qs + : typeof data.options.qs === 'object' + ? data.options.qs + : undefined + + return qs && parameter.name in qs } - - return false } /** @@ -1131,7 +1114,7 @@ export function getArgs({ } // If this parameter is provided via options, ignore - if (skipArg(parameter, operation, data)) { + if (shouldSkipArgumentBecauseOptions(parameter, operation, data)) { return } diff --git a/packages/openapi-to-graphql/src/types/options.ts b/packages/openapi-to-graphql/src/types/options.ts index 5c416063..f5bf9c0e 100644 --- a/packages/openapi-to-graphql/src/types/options.ts +++ b/packages/openapi-to-graphql/src/types/options.ts @@ -47,6 +47,23 @@ export type Headers = { [key: string]: string } /** * Given a set parameters corresponding to a specific operation in the OAS, * provide the appropriate headers + * + * NOTE: This will be used to modify resolvers AND the schema. For example, if + * a `foo` header is set, then the resolver call will append the `foo` header, + * and the `foo` parameter will be removed from the GraphQL schema. In + * resolver_builder.ts, the function will be called with all arguments, but in + * schema_builder.ts, only the `method`, `path`, and `title` will be provided + * (because `resolverParams` and `generatedRequestOptions` are only available + * during execution). Therefore, for query, path, header, and cookie parameters, + * a value must be provided without `resolverParam` and + * `generatedRequestOptions` or else the schema will not have the right + * parameters. + * + * @param method HTTP method of the operation + * @param path HTTP path of the operation + * @param title Title of the OAS (useful for multi-OAS input) + * @param resolverParams Optional. Resolver parameters. The parameter names will be + * sanitized. Refer to the `saneMap` in the `PreprocessingData` for mapping. */ export type RequestHeadersFunction = ( method: string, @@ -61,21 +78,44 @@ export type RequestHeadersFunction = ( ) => Headers /** - * We rely on the Request library in order to make resolver API calls. + * Given a set parameters corresponding to a specific operation in the OAS as + * well as the resolver parameters, provide the appropriate Request options * - * We expose the options so that users can have more control over the calls. + * NOTE: This will be used to modify resolvers AND the schema. For example, if + * a `foo` header is set, then the resolver call will append the `foo` header, + * and the `foo` parameter will be removed from the GraphQL schema. In + * resolver_builder.ts, the function will be called with all arguments, but in + * schema_builder.ts, only the `method`, `path`, and `title` will be provided + * (because `resolverParams` and `generatedRequestOptions` are only available + * during execution). Therefore, for query, path, header, and cookie parameters, + * a value must be provided without `resolverParam` and + * `generatedRequestOptions` or else the schema will not have the right + * parameters. * - * We modify the RequestOptions so that headers can also be provided as a - * function. - * - * Based on: https://github.com/request/request#requestoptions-callback + * @param method HTTP method of the operation + * @param path HTTP path of the operation + * @param title Title of the OAS (useful for multi-OAS input) + * @param resolverParams Optional. Resolver parameters. The parameter names will be + * sanitized. Refer to the `saneMap` in the `PreprocessingData` for mapping. + * @param generatedRequestOptions Optional. The generated Request options that + * would otherwise be used. */ -export type RequestOptions = Omit< - NodeRequest.OptionsWithUrl, - 'headers' -> & { - headers?: Headers | RequestHeadersFunction -} +export type RequestOptionsFunction = ( + method: string, + path: string, + title: string, + resolverParams?: { + source: TSource + args: TArgs + context: TContext + info: GraphQLResolveInfo + }, + generatedRequestOptions?: NodeRequest.OptionsWithUrl +) => Partial + +export type RequestOptions = + | Partial + | RequestOptionsFunction export type Options = Partial< InternalOptions @@ -132,7 +172,7 @@ export type InternalOptions = { * into a GraphQL ID type. To allow for more customzation, this option allows * users to specify other formats that should be interpreted as ID types. */ - idFormats?: string[] + idFormats: string[] /** * Allows to define the root operation type (Query or Mutation type) of any @@ -144,7 +184,7 @@ export type InternalOptions = { * The field is identifed first by the title of the OAS, then the path of the * operation, and lastly the method of the operation. */ - selectQueryOrMutationField?: OasTitlePathMethodObject + selectQueryOrMutationField: OasTitlePathMethodObject /** * Sets argument name for the payload of a mutation to 'requestBody' @@ -201,12 +241,12 @@ export type InternalOptions = { /** * Custom headers to send with every request made by a resolve function. */ - headers?: Headers | RequestHeadersFunction + headers: Headers | RequestHeadersFunction /** * Custom query parameters to send with every reqeust by a resolve function. */ - qs?: { [key: string]: string } + qs: { [key: string]: string } /** * We use the Request library to make calls to the API backend. @@ -215,20 +255,21 @@ export type InternalOptions = { * proxy to use. * * Headers can either be provided as an object or a function that returns - * an object. + * a Request library options object. * * Based on: https://github.com/request/request#requestoptions-callback */ - requestOptions?: Partial> + requestOptions: RequestOptions /** * Allows to override or add options to the PubSub connect object used to make - * publish/subscribe to the API backend. - * e.g. Setup the web proxy to use. + * publish/subscribe to the API backend, e.g. setup the web proxy to use. */ - connectOptions?: ConnectOptions + connectOptions: ConnectOptions /** + * Optional + * * Specifies the URL on which all paths will be based on. * Overrides the server object in the OAS. */ @@ -249,7 +290,7 @@ export type InternalOptions = { * implementing performance improvements like caching, or dealing with * non-standard authentication requirements. */ - customResolvers?: OasTitlePathMethodObject< + customResolvers: OasTitlePathMethodObject< GraphQLFieldResolver > @@ -271,7 +312,7 @@ export type InternalOptions = { * Note: Subscription fields will only be generated if the * createSubscriptionsFromCallbacks option is enabled. */ - customSubscriptionResolvers?: OasTitlePathMethodObject<{ + customSubscriptionResolvers: OasTitlePathMethodObject<{ subscribe: GraphQLFieldResolver resolve: GraphQLFieldResolver }> diff --git a/packages/openapi-to-graphql/test/authentication.test.ts b/packages/openapi-to-graphql/test/authentication.test.ts index 4eabc678..fc5f1128 100644 --- a/packages/openapi-to-graphql/test/authentication.test.ts +++ b/packages/openapi-to-graphql/test/authentication.test.ts @@ -152,8 +152,7 @@ test('Get project using API key passed in the requestOptions - viewer is disable requestOptions: { headers: { access_token: 'abcdef' - }, - url: undefined // Mandatory for requestOptions type + } } }) const query = `{ @@ -299,8 +298,7 @@ test('Get project using API key 3 passed in the requestOptions - viewer is disab requestOptions: { headers: { cookie: 'access_token=abcdef' - }, - url: undefined // Mandatory for requestOptions type + } } }) const query = `{ diff --git a/packages/openapi-to-graphql/test/example_api.test.ts b/packages/openapi-to-graphql/test/example_api.test.ts index 3267cbc5..b8c05a0d 100644 --- a/packages/openapi-to-graphql/test/example_api.test.ts +++ b/packages/openapi-to-graphql/test/example_api.test.ts @@ -2089,8 +2089,7 @@ test('Header arguments are not created when they are provided through requestOpt headers: { snack_type: 'chips', snack_size: 'large' - }, - url: undefined // Mandatory for requestOptions type + } } } @@ -2200,8 +2199,7 @@ test('Query string arguments are not created when they are provided through requ requestOptions: { qs: { limit: '10' - }, - url: undefined // Mandatory for requestOptions type + } } } @@ -2274,18 +2272,17 @@ test('Use headers option as function', () => { }) }) -test('Use requestOptions headers option as function', () => { +test('Use requestOptions option as function', () => { const options: Options = { - requestOptions: { - headers: (method, path, title) => { - if (method === 'get' && path === '/snack') { - return { + requestOptions: (method, path, title) => { + if (method === 'get' && path === '/snack') { + return { + headers: { snack_type: 'chips', snack_size: 'small' } } - }, - url: undefined // Mandatory for requestOptions type + } } } diff --git a/packages/openapi-to-graphql/test/example_api6.test.ts b/packages/openapi-to-graphql/test/example_api6.test.ts index 4919c5ae..36fd01a5 100644 --- a/packages/openapi-to-graphql/test/example_api6.test.ts +++ b/packages/openapi-to-graphql/test/example_api6.test.ts @@ -66,7 +66,6 @@ test('Option requestOptions should work with links', () => { const options: Options = { requestOptions: { - url: undefined, headers: { specialheader: 'requestOptions' } diff --git a/packages/openapi-to-graphql/test/example_gql_server.js b/packages/openapi-to-graphql/test/example_gql_server.js index 3a873d3a..00c28029 100644 --- a/packages/openapi-to-graphql/test/example_gql_server.js +++ b/packages/openapi-to-graphql/test/example_gql_server.js @@ -11,11 +11,11 @@ const { graphqlHTTP } = require('express-graphql') const app = express() const openAPIToGraphQL = require('../lib/index') -// const oas = require('./fixtures/example_oas.json') +const oas = require('./fixtures/example_oas.json') // const oas = require('./fixtures/example_oas2.json') // const oas = require('./fixtures/example_oas3.json') // const oas = require('./fixtures/example_oas4.json') -const oas = require('./fixtures/example_oas5.json') +// const oas = require('./fixtures/example_oas5.json') // const oas = require('./fixtures/example_oas6.json') // const oas = require('./fixtures/github.json')