Add graphql-api-koa

This commit is contained in:
Mike Marcacci
2019-03-27 11:54:49 -07:00
parent bd3a42fcae
commit 524db8f3c6
4 changed files with 49 additions and 0 deletions
+26
View File
@@ -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>;
+22
View File
@@ -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"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }