Skip to content

Commit dea6028

Browse files
Remove useless invariant since 'serialize' is always exist (#2063)
1 parent 168570f commit dea6028

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/execution/execute.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,6 @@ function completeListValue(
929929
* null if serialization is not possible.
930930
*/
931931
function completeLeafValue(returnType: GraphQLLeafType, result: mixed): mixed {
932-
invariant(returnType.serialize, 'Missing serialize method on type');
933932
const serializedResult = returnType.serialize(result);
934933
if (isInvalid(serializedResult)) {
935934
throw new Error(

0 commit comments

Comments
 (0)