graphql-extensions
- Version 0.16.0
- Published
- 31.8 kB
- 3 dependencies
- MIT license
Install
npm i graphql-extensionsyarn add graphql-extensionspnpm add graphql-extensionsOverview
Add extensions to GraphQL servers
Index
Functions
Classes
Type Aliases
Functions
function enableGraphQLExtensions
enableGraphQLExtensions: ( schema: GraphQLSchema & { _extensionsEnabled?: boolean }) => GraphQLSchema & { _extensionsEnabled?: boolean | undefined };Classes
class GraphQLExtension
class GraphQLExtension<TContext = any> {}method didEncounterErrors
didEncounterErrors: (errors: ReadonlyArray<GraphQLError>) => void;method executionDidStart
executionDidStart: (o: { executionArgs: ExecutionArgs }) => EndHandler | void;method format
format: () => [string, any] | undefined;method parsingDidStart
parsingDidStart: (o: { queryString: string }) => EndHandler | void;method requestDidStart
requestDidStart: (o: { request: Pick<Request, 'url' | 'method' | 'headers'>; queryString?: string; parsedQuery?: DocumentNode; operationName?: string; variables?: { [key: string]: any }; persistedQueryHit?: boolean; persistedQueryRegister?: boolean; context: TContext; requestContext: GraphQLRequestContext<TContext>;}) => EndHandler | void;method validationDidStart
validationDidStart: () => EndHandler | void;method willResolveField
willResolveField: ( source: any, args: { [argName: string]: any }, context: TContext, info: GraphQLResolveInfo) => void | ((error: Error | null, result?: any) => void);method willSendResponse
willSendResponse: (o: { graphqlResponse: GraphQLResponse; context: TContext;}) => void | { graphqlResponse: GraphQLResponse; context: TContext };class GraphQLExtensionStack
class GraphQLExtensionStack<TContext = any> {}constructor
constructor(extensions: GraphQLExtension<TContext>[]);property fieldResolver
fieldResolver?: GraphQLFieldResolver<any, any>;method didEncounterErrors
didEncounterErrors: (errors: ReadonlyArray<GraphQLError>) => void;method executionDidStart
executionDidStart: (o: { executionArgs: ExecutionArgs }) => EndHandler;method format
format: () => {};method parsingDidStart
parsingDidStart: (o: { queryString: string }) => EndHandler;method requestDidStart
requestDidStart: (o: { request: Pick<Request, 'url' | 'method' | 'headers'>; queryString?: string; parsedQuery?: DocumentNode; operationName?: string; variables?: { [key: string]: any }; persistedQueryHit?: boolean; persistedQueryRegister?: boolean; context: TContext; extensions?: Record<string, any>; requestContext: GraphQLRequestContext<TContext>;}) => EndHandler;method validationDidStart
validationDidStart: () => EndHandler;method willResolveField
willResolveField: ( source: any, args: { [argName: string]: any }, context: TContext, info: GraphQLResolveInfo) => (error: Error | null, result?: any) => void;method willSendResponse
willSendResponse: (o: { graphqlResponse: GraphQLResponse; context: TContext;}) => { graphqlResponse: GraphQLResponse; context: TContext };Type Aliases
type EndHandler
type EndHandler = (...errors: Array<Error>) => void;type FieldIteratorFn
type FieldIteratorFn = ( fieldDef: GraphQLField<any, any>, typeName: string, fieldName: string) => void;Package Files (1)
Dependencies (3)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (1)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/graphql-extensions.
- Markdown[](https://www.jsdocs.io/package/graphql-extensions)
- HTML<a href="https://www.jsdocs.io/package/graphql-extensions"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3812 ms. - Missing or incorrect documentation? Open an issue for this package.
