Skip to content

Commit

Permalink
Fix _openAPIToGraphQL leak
Browse files Browse the repository at this point in the history
Fix #349

Signed-off-by: Alan Cha <Alan.cha1@ibm.com>
  • Loading branch information
Alan-Cha committed Feb 8, 2021
1 parent a6db048 commit a06d6f4
Show file tree
Hide file tree
Showing 24 changed files with 536 additions and 350 deletions.
13 changes: 3 additions & 10 deletions packages/openapi-to-graphql/lib/auth_builder.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,15 @@
* Functions to create viewers that allow users to pass credentials to resolve
* functions used by OpenAPI-to-GraphQL.
*/
import { GraphQLObjectType, GraphQLFieldResolver } from 'graphql';
import { Args, GraphQLOperationType } from './types/graphql';
import { GraphQLFieldConfig } from 'graphql';
import { GraphQLOperationType } from './types/graphql';
import { PreprocessingData } from './types/preprocessing_data';
declare type Viewer<TSource, TContext, TArgs> = {
type: GraphQLObjectType;
resolve: GraphQLFieldResolver<TSource, TContext, TArgs>;
args: Args;
description: string;
};
/**
* Load the field object in the appropriate root object
*
* i.e. inside either rootQueryFields/rootMutationFields or inside
* rootQueryFields/rootMutationFields for further processing
*/
export declare function createAndLoadViewer<TSource, TContext, TArgs>(queryFields: object, operationType: GraphQLOperationType, data: PreprocessingData<TSource, TContext, TArgs>): {
[key: string]: Viewer<TSource, TContext, TArgs>;
[key: string]: GraphQLFieldConfig<TSource, TContext, TArgs>;
};
export {};
25 changes: 14 additions & 11 deletions packages/openapi-to-graphql/lib/auth_builder.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/openapi-to-graphql/lib/auth_builder.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/openapi-to-graphql/lib/oas_3_tools.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ export declare function getParameters(path: string, method: HTTP_METHODS, operat
*/
export declare function getServers(operation: OperationObject, pathItem: PathItemObject, oas: Oas3): ServerObject[];
/**
* Returns a map of Security Scheme definitions, identified by keys. Resolves
* Returns a map of security scheme definitions, identified by keys. Resolves
* possible references.
*/
export declare function getSecuritySchemes(oas: Oas3): {
[key: string]: SecuritySchemeObject;
[schemeKey: string]: SecuritySchemeObject;
};
/**
* Returns the list of sanitized keys of non-OAuth2 security schemes
Expand All @@ -166,7 +166,7 @@ export declare enum CaseStyle {
ALL_CAPS = 3
}
/**
* First sanitizes given string and then also camel-cases it.
* First sanitizes given string and then also camelCases it.
*/
export declare function sanitize(str: string, caseStyle: CaseStyle): string;
/**
Expand Down
12 changes: 6 additions & 6 deletions packages/openapi-to-graphql/lib/oas_3_tools.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/openapi-to-graphql/lib/oas_3_tools.js.map

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions packages/openapi-to-graphql/lib/preprocessor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/openapi-to-graphql/lib/preprocessor.js.map

Large diffs are not rendered by default.

0 comments on commit a06d6f4

Please sign in to comment.