Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Commit

Permalink
Use a named function for the middleware over an anonymous (#415)
Browse files Browse the repository at this point in the history
* Use a named function for the middleware over an anonymous

It's making the investigation of performance issues easier.

* Rename function to 'graphqlMiddleware'.
  • Loading branch information
oliviertassinari authored and IvanGoncharov committed Feb 18, 2018
1 parent 1fbfd72 commit 8b15ffb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function graphqlHTTP(options: Options): Middleware {
throw new Error('GraphQL middleware requires options.');
}

return (request: $Request, response: $Response) => {
return function graphqlMiddleware(request: $Request, response: $Response) {
// Higher scoped variables are referred to at various stages in the
// asynchronous state machine below.
let params;
Expand Down

0 comments on commit 8b15ffb

Please sign in to comment.