2.0.8 • Published 2 years ago

@types/graphql-api-koa v2.0.8

Weekly downloads
58
License
MIT
Repository
github
Last release
2 years ago

Installation

npm install --save @types/graphql-api-koa

Summary

This package contains type definitions for graphql-api-koa (https://github.com/jaydenseric/graphql-api-koa#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/graphql-api-koa.

index.d.ts

// 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 { DefaultContext, DefaultState, Middleware, ParameterizedContext } from "koa";

export interface ExecuteOptions {
  schema?: GraphQLSchema | undefined;
  rootValue?: any;
  contextValue?: any;
  fieldResolver?: any;
}

export function errorHandler(): Middleware;

export function execute<StateT = DefaultState, ContextT = DefaultContext>(
  options: ExecuteOptions & {
    override?: ((ctx: ParameterizedContext<StateT, ContextT>) => ExecuteOptions) | undefined;
  }
): Middleware<StateT, ContextT>;

Additional Details

Credits

These definitions were written by Mike Marcacci.

2.0.5

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.8

2 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago