Skip to content

Commit

Permalink
Update scalars.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
xonx4l committed Oct 6, 2023
1 parent 7a6d055 commit 3bb4cd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/type/scalars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ export const GraphQLID = new GraphQLScalarType<string>({
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)}`,
Expand Down

0 comments on commit 3bb4cd4

Please sign in to comment.