Skip to content

Commit

Permalink
Remove unnecessary string concatenations (graphql#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov authored and jliu670 committed Aug 14, 2020
1 parent c13c6e5 commit 045481e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,7 @@ function graphqlHTTP(options: Options): Middleware {
response.setHeader('Allow', 'POST');
throw httpError(
405,
`Can only perform a ${operationAST.operation} operation ` +
'from a POST request.',
`Can only perform a ${operationAST.operation} operation from a POST request.`,
);
}
}
Expand Down Expand Up @@ -411,8 +410,7 @@ function graphqlHTTP(options: Options): Middleware {
// Assert that optionsData is in fact an Object.
if (!optionsData || typeof optionsData !== 'object') {
throw new Error(
'GraphQL middleware option function must return an options object ' +
'or a promise which will be resolved to an options object.',
'GraphQL middleware option function must return an options object or a promise which will be resolved to an options object.',
);
}

Expand Down

0 comments on commit 045481e

Please sign in to comment.