From 3bb4cd400b759d422d19b8c63db85344a8c076b7 Mon Sep 17 00:00:00 2001 From: xonx <119700621+xonx4l@users.noreply.github.com> Date: Sat, 7 Oct 2023 01:04:22 +0530 Subject: [PATCH] Update scalars.ts ISSUE-:#3913 --- src/type/scalars.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/type/scalars.ts b/src/type/scalars.ts index d2c9c9bee2..81d89cd8e9 100644 --- a/src/type/scalars.ts +++ b/src/type/scalars.ts @@ -222,8 +222,8 @@ export const GraphQLID = new GraphQLScalarType({ if (typeof coercedValue === 'string') { return coercedValue; } - if (Number.isInteger(coercedValue)) { - return String(coercedValue); + if (Number.isInteger(coercedValue) || typeof coercedValue == "bigint") { + return String(coercedValue); } throw new GraphQLError( `ID cannot represent value: ${inspect(outputValue)}`,