mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
24 lines
741 B
TypeScript
24 lines
741 B
TypeScript
// Type definitions for graphql-api-koa 2.0
|
|
// Project: https://github.com/jaydenseric/graphql-api-koa#readme
|
|
// Definitions by: Mike Marcacci <https://github.com/mike-marcacci>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 3.3
|
|
|
|
import { GraphQLSchema } from "graphql";
|
|
import { Middleware, ParameterizedContext } from "koa";
|
|
|
|
export interface ExecuteOptions {
|
|
schema?: GraphQLSchema;
|
|
rootValue?: any;
|
|
contextValue?: any;
|
|
fieldResolver?: any;
|
|
}
|
|
|
|
export function errorHandler(): Middleware;
|
|
|
|
export function execute<StateT = any, CustomT = {}>(
|
|
options: ExecuteOptions & {
|
|
override?: (ctx: ParameterizedContext<StateT, CustomT>) => ExecuteOptions;
|
|
}
|
|
): Middleware<StateT, CustomT>;
|