Skip to content

Commit

Permalink
Remove useless invariant since 'serialize' is always exist (#2063)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Jul 30, 2019
1 parent 168570f commit dea6028
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/execution/execute.js
Expand Up @@ -929,7 +929,6 @@ function completeListValue(
* null if serialization is not possible.
*/
function completeLeafValue(returnType: GraphQLLeafType, result: mixed): mixed {
invariant(returnType.serialize, 'Missing serialize method on type');
const serializedResult = returnType.serialize(result);
if (isInvalid(serializedResult)) {
throw new Error(
Expand Down

0 comments on commit dea6028

Please sign in to comment.