mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 07:47:04 +00:00
Add graphql-api-koa
This commit is contained in:
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
// 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: 2.6
|
||||
|
||||
import { GraphQLSchema } from "graphql";
|
||||
import { Middleware, ParameterizedContext } from "koa";
|
||||
|
||||
interface ExecuteOptions {
|
||||
schema?: GraphQLSchema;
|
||||
rootValue?: any;
|
||||
contextValue?: any;
|
||||
fieldResolver?: any;
|
||||
}
|
||||
|
||||
export const errorHandler: <StateT = any, CustomT = {}>() => Middleware<
|
||||
StateT,
|
||||
CustomT
|
||||
>;
|
||||
|
||||
export const execute: <StateT = any, CustomT = {}>(
|
||||
options: ExecuteOptions & {
|
||||
override?: (ctx: ParameterizedContext<StateT, CustomT>) => ExecuteOptions;
|
||||
}
|
||||
) => Middleware<StateT, CustomT>;
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"graphql-api-koa-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user