Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/main/java/graphql/Scalars.java
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,9 @@ private String convertImpl(Object input) {
if (input instanceof Integer) {
return String.valueOf(input);
}
if (input instanceof Long) {
return String.valueOf(input);
}
return null;

}
Expand Down
7 changes: 4 additions & 3 deletions src/test/groovy/graphql/ScalarsIDTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ class ScalarsIDTest extends Specification {
Scalars.GraphQLID.getCoercing().parseValue(value) == result

where:
value | result
"123ab" | "123ab"
123 | "123"
value | result
"123ab" | "123ab"
123 | "123"
123123123123123123L | "123123123123123123"
}

@Unroll
Expand Down