Use esModuleInterop mode, and improve tests

This commit is contained in:
Mike Marcacci 2019-04-02 22:54:29 -07:00
parent 7355fe1925
commit e59848763a
2 changed files with 2 additions and 26 deletions

View File

@ -1,27 +1,3 @@
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";
@ -43,4 +19,3 @@ const app = new Koa()
})
})
}));
*/

View File

@ -14,7 +14,8 @@
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true
},
"files": [
"index.d.ts",