mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Fix MORE lint errors
This commit is contained in:
parent
a8782e7078
commit
7355fe1925
@ -1,3 +1,27 @@
|
||||
import { GraphQLSchema, GraphQLObjectType, GraphQLString } from "graphql";
|
||||
import { execute } from "graphql-api-koa";
|
||||
|
||||
execute({
|
||||
schema: new GraphQLSchema({
|
||||
query: new GraphQLObjectType({
|
||||
name: "Query",
|
||||
fields: () => ({
|
||||
hello: {
|
||||
type: GraphQLString,
|
||||
resolve() {
|
||||
return "world";
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
/* This is the thest that SHOULD exist here... but for whatever reason, the
|
||||
DefinitelyTyped repo always errors with:
|
||||
|
||||
Module '"/Users/mike/Code/DefinitelyTyped/types/koa/index"' has no default export.
|
||||
|
||||
import Koa from "koa";
|
||||
import { GraphQLSchema, GraphQLObjectType, GraphQLString } from "graphql";
|
||||
import { errorHandler, execute } from "graphql-api-koa";
|
||||
@ -19,3 +43,4 @@ const app = new Koa()
|
||||
})
|
||||
})
|
||||
}));
|
||||
*/
|
||||
|
||||
5
types/graphql-api-koa/index.d.ts
vendored
5
types/graphql-api-koa/index.d.ts
vendored
@ -14,10 +14,7 @@ export interface ExecuteOptions {
|
||||
fieldResolver?: any;
|
||||
}
|
||||
|
||||
export function errorHandler<StateT = any, CustomT = {}>(): Middleware<
|
||||
StateT,
|
||||
CustomT
|
||||
>;
|
||||
export function errorHandler(): Middleware;
|
||||
|
||||
export function execute<StateT = any, CustomT = {}>(
|
||||
options: ExecuteOptions & {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user