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

Commit

Permalink
Remove unnecessary string concatenations
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Jul 10, 2019
1 parent da1e9bf commit 67a6061
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 67a6061

Please sign in to comment.