We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfbfdcc commit 10ed7caCopy full SHA for 10ed7ca
src/resolvers/BigInt.ts
@@ -6,7 +6,8 @@ import { Kind } from 'graphql/language/kinds';
6
7
const coerceBigInt = (value: any) => {
8
if (typeof BigInt === 'undefined') {
9
- const number = value.toString().replace('n', '');
+ const numberStr = value.toString().replace('n', '');
10
+ const number = Number(numberStr);
11
if (!Number.isInteger(number)) {
12
throw new Error(`${value} is not an integer!`);
13
}
0 commit comments