@@ -13,7 +13,7 @@ public class Scalars {
1313
1414 public static GraphQLScalarType GraphQLInt = new GraphQLScalarType ("Int" , "Built-in Int" , new Coercing () {
1515 @ Override
16- public Object coerce (Object input ) {
16+ public Object serialize (Object input ) {
1717 if (input instanceof String ) {
1818 return Integer .parseInt ((String ) input );
1919 } else if (input instanceof Integer ) {
@@ -38,7 +38,7 @@ public Object parseLiteral(Object input) {
3838
3939 public static GraphQLScalarType GraphQLLong = new GraphQLScalarType ("Long" , "Long type" , new Coercing () {
4040 @ Override
41- public Object coerce (Object input ) {
41+ public Object serialize (Object input ) {
4242 if (input instanceof String ) {
4343 return Long .parseLong ((String ) input );
4444 } else if (input instanceof Long ) {
@@ -64,7 +64,7 @@ public Object parseLiteral(Object input) {
6464
6565 public static GraphQLScalarType GraphQLFloat = new GraphQLScalarType ("Float" , "Built-in Float" , new Coercing () {
6666 @ Override
67- public Object coerce (Object input ) {
67+ public Object serialize (Object input ) {
6868 if (input instanceof String ) {
6969 return Float .parseFloat ((String ) input );
7070 } else if (input instanceof Float ) {
@@ -87,7 +87,7 @@ public Object parseLiteral(Object input) {
8787
8888 public static GraphQLScalarType GraphQLString = new GraphQLScalarType ("String" , "Built-in String" , new Coercing () {
8989 @ Override
90- public Object coerce (Object input ) {
90+ public Object serialize (Object input ) {
9191 return input == null ? null : input .toString ();
9292 }
9393
@@ -106,7 +106,7 @@ public Object parseLiteral(Object input) {
106106
107107 public static GraphQLScalarType GraphQLBoolean = new GraphQLScalarType ("Boolean" , "Built-in Boolean" , new Coercing () {
108108 @ Override
109- public Object coerce (Object input ) {
109+ public Object serialize (Object input ) {
110110 if (input instanceof Boolean ) {
111111 return input ;
112112 } else if (input instanceof Integer ) {
@@ -133,7 +133,7 @@ public Object parseLiteral(Object input) {
133133
134134 public static GraphQLScalarType GraphQLID = new GraphQLScalarType ("ID" , "Built-in ID" , new Coercing () {
135135 @ Override
136- public Object coerce (Object input ) {
136+ public Object serialize (Object input ) {
137137 if (input instanceof String ) {
138138 return input ;
139139 }
0 commit comments