graphql-extensions
Advanced tools
Comparing version 0.1.0-beta.1 to 0.1.0-beta.2
@@ -6,2 +6,4 @@ import { GraphQLSchema, GraphQLField, GraphQLResolveInfo, ExecutionArgs } from 'graphql'; | ||
} | ||
export declare type GraphQLExtensionFactory<TContext = any> = ((o: GraphQLExtensionOptions) => GraphQLExtension<TContext>); | ||
export declare type GraphQLExtensionOrFactory<TContext = any> = GraphQLExtension<TContext> | GraphQLExtensionFactory<TContext>; | ||
export declare class GraphQLExtension<TContext = any> { | ||
@@ -19,3 +21,3 @@ requestDidStart?(): EndHandler | void; | ||
private extensions; | ||
constructor(extensions: (((o: GraphQLExtensionOptions) => GraphQLExtension<TContext>) | GraphQLExtension<TContext>)[], options: GraphQLExtensionOptions); | ||
constructor(extensions: GraphQLExtensionOrFactory<TContext>[], options: GraphQLExtensionOptions); | ||
requestDidStart(): (() => void); | ||
@@ -22,0 +24,0 @@ parsingDidStart(): (() => void); |
{ | ||
"name": "graphql-extensions", | ||
"version": "0.1.0-beta.1", | ||
"version": "0.1.0-beta.2", | ||
"description": "Add extensions to GraphQL servers", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -22,2 +22,9 @@ import { | ||
export type GraphQLExtensionFactory<TContext = any> = (( | ||
o: GraphQLExtensionOptions, | ||
) => GraphQLExtension<TContext>); | ||
export type GraphQLExtensionOrFactory<TContext = any> = | ||
| GraphQLExtension<TContext> | ||
| GraphQLExtensionFactory<TContext>; | ||
export class GraphQLExtension<TContext = any> { | ||
@@ -43,5 +50,3 @@ public requestDidStart?(): EndHandler | void; | ||
constructor( | ||
extensions: ( | ||
| ((o: GraphQLExtensionOptions) => GraphQLExtension<TContext>) | ||
| GraphQLExtension<TContext>)[], | ||
extensions: GraphQLExtensionOrFactory<TContext>[], | ||
options: GraphQLExtensionOptions, | ||
@@ -48,0 +53,0 @@ ) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24427
484