File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' graphql-scalars ' : patch
3+ ---
4+
5+ Fix BigInt handling
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ export const GraphQLBigIntConfig: GraphQLScalarTypeConfig<
8080 if ( inputValue . toString ( ) !== bigint . toString ( ) ) {
8181 throw createGraphQLError ( `BigInt cannot represent value: ${ inputValue } ` ) ;
8282 }
83- if ( ! isSafeInteger ( bigint ) && ! isBigIntSerializable ( ) ) {
83+ if ( isSafeInteger ( bigint ) && ! isBigIntSerializable ( ) ) {
8484 return Number ( bigint . toString ( ) ) ;
8585 }
8686 return bigint ;
@@ -96,7 +96,7 @@ export const GraphQLBigIntConfig: GraphQLScalarTypeConfig<
9696 if ( strOrBooleanValue . toString ( ) !== bigint . toString ( ) ) {
9797 throw createGraphQLError ( `BigInt cannot represent value: ${ strOrBooleanValue } ` ) ;
9898 }
99- if ( ! isSafeInteger ( bigint ) && ! isBigIntSerializable ( ) ) {
99+ if ( isSafeInteger ( bigint ) && ! isBigIntSerializable ( ) ) {
100100 return Number ( bigint . toString ( ) ) ;
101101 }
102102 return bigint ;
You can’t perform that action at this time.
0 commit comments