Skip to content

Commit 6f82be9

Browse files
authored
Merge pull request #20 from simeonleatherland/AddingJavaScalars
Adding Java Scalars
2 parents 508817d + 4f85f91 commit 6f82be9

8 files changed

+1089
-1
lines changed

src/main/java/graphql/scalars/ExtendedScalars.java

+33-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import graphql.scalars.datetime.DateScalar;
66
import graphql.scalars.datetime.DateTimeScalar;
77
import graphql.scalars.datetime.TimeScalar;
8+
import graphql.scalars.java.JavaPrimitives;
9+
import graphql.scalars.locale.LocaleScalar;
810
import graphql.scalars.numeric.NegativeFloatScalar;
911
import graphql.scalars.numeric.NegativeIntScalar;
1012
import graphql.scalars.numeric.NonNegativeFloatScalar;
@@ -17,7 +19,6 @@
1719
import graphql.scalars.object.ObjectScalar;
1820
import graphql.scalars.regex.RegexScalar;
1921
import graphql.scalars.url.UrlScalar;
20-
import graphql.scalars.locale.LocaleScalar;
2122
import graphql.schema.GraphQLScalarType;
2223

2324
/**
@@ -205,4 +206,35 @@ public static RegexScalar.Builder newRegexScalar(String name) {
205206
public static AliasedScalar.Builder newAliasedScalar(String name) {
206207
return new AliasedScalar.Builder().name(name);
207208
}
209+
210+
/**
211+
* This represents the "Long" type which is a representation of java.lang.Long
212+
*/
213+
public static final GraphQLScalarType GraphQLLong = JavaPrimitives.GraphQLLong;
214+
215+
/**
216+
* This represents the "Short" type which is a representation of java.lang.Short
217+
*/
218+
public static final GraphQLScalarType GraphQLShort = JavaPrimitives.GraphQLShort;
219+
220+
/**
221+
* This represents the "Byte" type which is a representation of java.lang.Byte
222+
*/
223+
public static final GraphQLScalarType GraphQLByte = JavaPrimitives.GraphQLByte;
224+
225+
/**
226+
* This represents the "BigDecimal" type which is a representation of java.math.BigDecimal
227+
*/
228+
public static final GraphQLScalarType GraphQLBigDecimal = JavaPrimitives.GraphQLBigDecimal;
229+
230+
/**
231+
* This represents the "BigInteger" type which is a representation of java.math.BigInteger
232+
*/
233+
public static final GraphQLScalarType GraphQLBigInteger = JavaPrimitives.GraphQLBigInteger;
234+
235+
/**
236+
* This represents the "Char" type which is a representation of java.lang.Character
237+
*/
238+
public static final GraphQLScalarType GraphQLChar = JavaPrimitives.GraphQLChar;
239+
208240
}

0 commit comments

Comments
 (0)