@@ -39,13 +39,20 @@ private static String mapBoolean(BooleanValue value) {
3939 return value .isValue () ? "true" : "false" ;
4040 }
4141
42- //TODO It should also be abstracted. Different languages have different default values(It is now implemented in
43- // templates (templates are extremely complex))
42+ /**
43+ * Map value of GraphQL Int type to a value that will be present in a generated code.
44+ * TODO: should also be abstracted because different languages have different default values
45+ *
46+ * @param mappingContext Global mapping context
47+ * @param value GraphQL Value
48+ * @param graphQLType GraphQL Type
49+ * @return formatted value
50+ */
4451 private static String mapInt (MappingContext mappingContext , IntValue value , Type <?> graphQLType ) {
45- //default java basic type is `int`. so, default value like 123 that must wrap or append suffix `L` when it be
52+ // default java basic type is `int`. so, default value like 123 that must wrap or append suffix `L` when it be
4653 // defined as `int` in graphql schema.
47- //`int` cannot assign to `Long`, also `double` cannot assign to `Float`, but graphql Float default mapping is
48- // Double in java, so, not modify `mapFloat`.
54+ // `int` cannot assign to `Long`, also `double` cannot assign to `Float`, but graphql Float default mapping is
55+ // Double in java, so, not modify `mapFloat`.
4956 if (graphQLType instanceof TypeName ) {
5057 String customType = mappingContext .getCustomTypesMapping ().get ("Long" );
5158 String typeName = ((TypeName ) graphQLType ).getName ();
0 commit comments