File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export default new GraphQLScalarType({
1818 } ,
1919
2020 parseLiteral ( ast ) {
21- if ( ast . kind !== Kind . FLOAT ) {
21+ if ( ast . kind !== Kind . FLOAT && ast . kind !== Kind . INT ) {
2222 throw new GraphQLError (
2323 `Can only validate floating point numbers as negative floating point numbers but got a: ${
2424 ast . kind
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export default function (name = 'NonNegativeFloat') {
1919 } ,
2020
2121 parseLiteral ( ast ) {
22- if ( ast . kind !== Kind . FLOAT ) {
22+ if ( ast . kind !== Kind . FLOAT && ast . kind !== Kind . INT ) {
2323 throw new GraphQLError (
2424 `Can only validate floating point numbers as non-negative floating point numbers but got a: ${
2525 ast . kind
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export default new GraphQLScalarType({
1818 } ,
1919
2020 parseLiteral ( ast ) {
21- if ( ast . kind !== Kind . FLOAT ) {
21+ if ( ast . kind !== Kind . FLOAT && ast . kind !== Kind . INT ) {
2222 throw new GraphQLError (
2323 `Can only validate floating point numbers as non-positive floating point numbers but got a: ${
2424 ast . kind
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export default new GraphQLScalarType({
1818 } ,
1919
2020 parseLiteral ( ast ) {
21- if ( ast . kind !== Kind . FLOAT ) {
21+ if ( ast . kind !== Kind . FLOAT && ast . kind !== Kind . INT ) {
2222 throw new GraphQLError (
2323 `Can only validate floating point numbers as positive floating point numbers but got a: ${
2424 ast . kind
You can’t perform that action at this time.
0 commit comments