Interface GraphQLServerBootstrapOptions<TContext>

interface GraphQLServerBootstrapOptions<TContext> {
    acknowledge?: AcknowledgeFn;
    connectionInitWaitTimeout?: number;
    createContext: CreateContextFn<TContext>;
    defaultFieldResolver?: GraphQLFieldResolver<unknown, TContext>;
    http?: GraphQLHttpServer<TContext>;
    parser?: GraphQLExecutionArgsParser;
    parserOptions?: GraphQLExecutionArgsParserOptions;
    reader?: GraphQLReader;
    resolverErrorHandler?: ResolverErrorHandler<TContext>;
    resolvers?: ResolversInput<TContext>;
    root?: string;
    schema?: string | GraphQLSchema;
    stitching?: boolean;
    ws?: GraphQLWebSocketServer<TContext>;
}

Type Parameters

  • TContext

Hierarchy

Properties

acknowledge?: AcknowledgeFn

Acknowledgement function. Called once per connection with the initialization message payload. May throw an error to cause socket closure (4401 Unauthorized).

connectionInitWaitTimeout?: number

Timeout until receiving initialization message, in milliseconds. Defaults to 3000.

createContext: CreateContextFn<TContext>

Function to create context from HTTP headers.

defaultFieldResolver?: GraphQLFieldResolver<unknown, TContext>

Default field resolver.

Overrides execution args parser.

Execution args parser options.

reader?: GraphQLReader

GraphQLReader instance.

resolverErrorHandler?: ResolverErrorHandler<TContext>

Resolver error handler.

Resolver definitions, or list of resolver definitions.

root?: string

Path to root directory for code generation. It's recommended to use a root relative to __dirname. Defaults to the current working dir.

schema?: string | GraphQLSchema

Path to directory of GraphQL schema documents, relative to root, OR a GraphQLSchema instance. Defaults to "schema".

stitching?: boolean