Skip to content

Commit 1c0d050

Browse files
committedJun 5, 2018
fix: add netlify handler. Closes #358
1 parent 76128e8 commit 1c0d050

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

Diff for: ‎src/lambda.ts

+8
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,12 @@ export class GraphQLServerLambda {
135135
endpoint: this.options.endpoint,
136136
})(event, lambdaContext, callback)
137137
}
138+
139+
handler = (event, lambdaContext, callback) => {
140+
if (event.httpMethod === 'GET') {
141+
return this.playgroundHandler(event, lambdaContext, callback)
142+
} else {
143+
return this.graphqlHandler(event, lambdaContext, callback)
144+
}
145+
}
138146
}

0 commit comments

Comments
 (0)