Skip to content

Commit a06d6f4

Browse files
committed
Fix _openAPIToGraphQL leak
Fix #349 Signed-off-by: Alan Cha <[email protected]>
1 parent a6db048 commit a06d6f4

24 files changed

+536
-350
lines changed

packages/openapi-to-graphql/lib/auth_builder.d.ts

+3-10
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,15 @@
22
* Functions to create viewers that allow users to pass credentials to resolve
33
* functions used by OpenAPI-to-GraphQL.
44
*/
5-
import { GraphQLObjectType, GraphQLFieldResolver } from 'graphql';
6-
import { Args, GraphQLOperationType } from './types/graphql';
5+
import { GraphQLFieldConfig } from 'graphql';
6+
import { GraphQLOperationType } from './types/graphql';
77
import { PreprocessingData } from './types/preprocessing_data';
8-
declare type Viewer<TSource, TContext, TArgs> = {
9-
type: GraphQLObjectType;
10-
resolve: GraphQLFieldResolver<TSource, TContext, TArgs>;
11-
args: Args;
12-
description: string;
13-
};
148
/**
159
* Load the field object in the appropriate root object
1610
*
1711
* i.e. inside either rootQueryFields/rootMutationFields or inside
1812
* rootQueryFields/rootMutationFields for further processing
1913
*/
2014
export declare function createAndLoadViewer<TSource, TContext, TArgs>(queryFields: object, operationType: GraphQLOperationType, data: PreprocessingData<TSource, TContext, TArgs>): {
21-
[key: string]: Viewer<TSource, TContext, TArgs>;
15+
[key: string]: GraphQLFieldConfig<TSource, TContext, TArgs>;
2216
};
23-
export {};

packages/openapi-to-graphql/lib/auth_builder.js

+14-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/auth_builder.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/oas_3_tools.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,11 @@ export declare function getParameters(path: string, method: HTTP_METHODS, operat
146146
*/
147147
export declare function getServers(operation: OperationObject, pathItem: PathItemObject, oas: Oas3): ServerObject[];
148148
/**
149-
* Returns a map of Security Scheme definitions, identified by keys. Resolves
149+
* Returns a map of security scheme definitions, identified by keys. Resolves
150150
* possible references.
151151
*/
152152
export declare function getSecuritySchemes(oas: Oas3): {
153-
[key: string]: SecuritySchemeObject;
153+
[schemeKey: string]: SecuritySchemeObject;
154154
};
155155
/**
156156
* Returns the list of sanitized keys of non-OAuth2 security schemes
@@ -166,7 +166,7 @@ export declare enum CaseStyle {
166166
ALL_CAPS = 3
167167
}
168168
/**
169-
* First sanitizes given string and then also camel-cases it.
169+
* First sanitizes given string and then also camelCases it.
170170
*/
171171
export declare function sanitize(str: string, caseStyle: CaseStyle): string;
172172
/**

packages/openapi-to-graphql/lib/oas_3_tools.js

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/oas_3_tools.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/preprocessor.js

+14-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/preprocessor.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)