Skip to content

Commit 10ed7ca

Browse files
committed
v1.0.4
1 parent dfbfdcc commit 10ed7ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/resolvers/BigInt.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { Kind } from 'graphql/language/kinds';
66

77
const coerceBigInt = (value: any) => {
88
if (typeof BigInt === 'undefined') {
9-
const number = value.toString().replace('n', '');
9+
const numberStr = value.toString().replace('n', '');
10+
const number = Number(numberStr);
1011
if (!Number.isInteger(number)) {
1112
throw new Error(`${value} is not an integer!`);
1213
}

0 commit comments

Comments
 (0)