File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ import helmet = require("helmet");
6
6
import { welcomeQuery } from "./graphiQL_welcome_query" ;
7
7
import { schema } from "./schema" ;
8
8
9
- const app = express ( ) ;
9
+ const app : express . Application = express ( ) ;
10
10
11
- const helperMiddleware = [
11
+ const helperMiddleware : express . RequestHandler [ ] = [
12
12
bodyParser . json ( ) ,
13
13
bodyParser . text ( { type : "application/graphql" } ) ,
14
14
( req : express . Request , res : express . Response , next : any ) => {
Original file line number Diff line number Diff line change 1
- export const welcomeQuery = `# Welcome to GraphiQL
1
+ export const welcomeQuery : string = `# Welcome to GraphiQL
2
2
3
3
query{
4
4
hi
Original file line number Diff line number Diff line change
1
+ import { GraphQLSchema } from "graphql" ;
1
2
import { makeExecutableSchema } from "graphql-tools" ;
2
3
import { resolvers } from "./schema/resolvers" ;
3
4
import { typeDefs } from "./schema/typeDefs" ;
4
5
5
- export const schema = makeExecutableSchema ( {
6
+ export const schema : GraphQLSchema = makeExecutableSchema ( {
6
7
resolvers,
7
8
typeDefs,
8
9
} ) ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import dotenv = require("dotenv");
2
2
import app from "./app" ;
3
3
dotenv . config ( ) ;
4
4
5
- const PORT = process . env . PORT ;
5
+ const PORT : string | undefined = process . env . PORT ;
6
6
7
7
app . listen ( PORT , ( ) => {
8
8
/*tslint:disable no-console*/
You can’t perform that action at this time.
0 commit comments