Skip to content

Commit b5bc7a2

Browse files
committed
add missing types
1 parent 0da9980 commit b5bc7a2

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

src/app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import helmet = require("helmet");
66
import {welcomeQuery} from "./graphiQL_welcome_query";
77
import {schema} from "./schema";
88

9-
const app = express();
9+
const app: express.Application = express();
1010

11-
const helperMiddleware = [
11+
const helperMiddleware: express.RequestHandler[] = [
1212
bodyParser.json(),
1313
bodyParser.text({ type: "application/graphql" }),
1414
(req: express.Request, res: express.Response, next: any) => {

src/graphiQL_welcome_query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const welcomeQuery = `# Welcome to GraphiQL
1+
export const welcomeQuery: string = `# Welcome to GraphiQL
22
33
query{
44
hi

src/schema.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
import {GraphQLSchema} from "graphql";
12
import { makeExecutableSchema } from "graphql-tools";
23
import {resolvers} from "./schema/resolvers";
34
import {typeDefs} from "./schema/typeDefs";
45

5-
export const schema = makeExecutableSchema({
6+
export const schema: GraphQLSchema = makeExecutableSchema({
67
resolvers,
78
typeDefs,
89
});

src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import dotenv = require("dotenv");
22
import app from "./app";
33
dotenv.config();
44

5-
const PORT = process.env.PORT;
5+
const PORT: string | undefined = process.env.PORT;
66

77
app.listen(PORT, () => {
88
/*tslint:disable no-console*/

0 commit comments

Comments
 (0)