@@ -39,7 +39,7 @@ public class ExtendedScalars {
3939 * @see java.time.OffsetDateTime
4040 * @see java.time.ZonedDateTime
4141 */
42- public static GraphQLScalarType DateTime = new DateTimeScalar () ;
42+ public static GraphQLScalarType DateTime = DateTimeScalar . INSTANCE ;
4343
4444 /**
4545 * An RFC-3339 compliant date scalar that accepts string values like `1996-12-19` and produces
@@ -52,7 +52,7 @@ public class ExtendedScalars {
5252 *
5353 * @see java.time.LocalDate
5454 */
55- public static GraphQLScalarType Date = new DateScalar () ;
55+ public static GraphQLScalarType Date = DateScalar . INSTANCE ;
5656 /**
5757 * An RFC-3339 compliant time scalar that accepts string values like `6:39:57-08:00` and produces
5858 * `java.time.OffsetTime` objects at runtime.
@@ -64,7 +64,7 @@ public class ExtendedScalars {
6464 *
6565 * @see java.time.OffsetTime
6666 */
67- public static GraphQLScalarType Time = new TimeScalar () ;
67+ public static GraphQLScalarType Time = TimeScalar . INSTANCE ;
6868
6969 /**
7070 * An object scalar allows you to have a multi level data value without defining it in the graphql schema.
@@ -89,7 +89,7 @@ public class ExtendedScalars {
8989 *
9090 * @see #Json
9191 */
92- public static GraphQLScalarType Object = new ObjectScalar () ;
92+ public static GraphQLScalarType Object = ObjectScalar . INSTANCE ;
9393
9494 /**
9595 * A synonym class for the {@link #Object} scalar, since some people prefer their SDL to look like the following :
@@ -106,68 +106,68 @@ public class ExtendedScalars {
106106 *
107107 * @see graphql.scalars.ExtendedScalars#Object
108108 */
109- public static GraphQLScalarType Json = new JsonScalar () ;
109+ public static GraphQLScalarType Json = JsonScalar . INSTANCE ;
110110
111111 /**
112112 * A URL scalar that accepts URL strings and produces {@link java.net.URL} objects at runtime
113113 */
114- public static GraphQLScalarType Url = new UrlScalar () ;
114+ public static GraphQLScalarType Url = UrlScalar . INSTANCE ;
115115
116116 /**
117117 * A Locale scalar that accepts a IETF BCP 47 language tag string and produces {@link
118118 * java.util.Locale} objects at runtime.
119119 */
120- public static GraphQLScalarType Locale = new LocaleScalar () ;
120+ public static GraphQLScalarType Locale = LocaleScalar . INSTANCE ;
121121
122122 /**
123123 * An `Int` scalar that MUST be greater than zero
124124 *
125125 * @see graphql.Scalars#GraphQLInt
126126 */
127- public static GraphQLScalarType PositiveInt = new PositiveIntScalar () ;
127+ public static GraphQLScalarType PositiveInt = PositiveIntScalar . INSTANCE ;
128128 /**
129129 * An `Int` scalar that MUST be less than zero
130130 *
131131 * @see graphql.Scalars#GraphQLInt
132132 */
133- public static GraphQLScalarType NegativeInt = new NegativeIntScalar () ;
133+ public static GraphQLScalarType NegativeInt = NegativeIntScalar . INSTANCE ;
134134 /**
135135 * An `Int` scalar that MUST be less than or equal to zero
136136 *
137137 * @see graphql.Scalars#GraphQLInt
138138 */
139- public static GraphQLScalarType NonPositiveInt = new NonPositiveIntScalar () ;
139+ public static GraphQLScalarType NonPositiveInt = NonPositiveIntScalar . INSTANCE ;
140140 /**
141141 * An `Int` scalar that MUST be greater than or equal to zero
142142 *
143143 * @see graphql.Scalars#GraphQLInt
144144 */
145- public static GraphQLScalarType NonNegativeInt = new NonNegativeIntScalar () ;
145+ public static GraphQLScalarType NonNegativeInt = NonNegativeIntScalar . INSTANCE ;
146146
147147 /**
148148 * An `Float` scalar that MUST be greater than zero
149149 *
150150 * @see graphql.Scalars#GraphQLFloat
151151 */
152- public static GraphQLScalarType PositiveFloat = new PositiveFloatScalar () ;
152+ public static GraphQLScalarType PositiveFloat = PositiveFloatScalar . INSTANCE ;
153153 /**
154154 * An `Float` scalar that MUST be less than zero
155155 *
156156 * @see graphql.Scalars#GraphQLFloat
157157 */
158- public static GraphQLScalarType NegativeFloat = new NegativeFloatScalar () ;
158+ public static GraphQLScalarType NegativeFloat = NegativeFloatScalar . INSTANCE ;
159159 /**
160160 * An `Float` scalar that MUST be less than or equal to zero
161161 *
162162 * @see graphql.Scalars#GraphQLFloat
163163 */
164- public static GraphQLScalarType NonPositiveFloat = new NonPositiveFloatScalar () ;
164+ public static GraphQLScalarType NonPositiveFloat = NonPositiveFloatScalar . INSTANCE ;
165165 /**
166166 * An `Float` scalar that MUST be greater than or equal to zero
167167 *
168168 * @see graphql.Scalars#GraphQLFloat
169169 */
170- public static GraphQLScalarType NonNegativeFloat = new NonNegativeFloatScalar () ;
170+ public static GraphQLScalarType NonNegativeFloat = NonNegativeFloatScalar . INSTANCE ;
171171
172172
173173 /**
@@ -177,6 +177,8 @@ public class ExtendedScalars {
177177 * The scalar converts any passed in objects to Strings first and them matches it against the provided
178178 * scalars to ensure its an acceptable value.
179179 *
180+ * @param name the name of the scalar
181+ *
180182 * @return a builder of a regex scalar
181183 */
182184 public static RegexScalar .Builder newRegexScalar (String name ) {
@@ -188,7 +190,6 @@ public static RegexScalar.Builder newRegexScalar(String name) {
188190 * <p>
189191 * For example you may take a `String` scalar and alias it as `SocialMediaLink` if that helps introduce
190192 * more semantic meaning to your type system.
191- * <p>
192193 * <pre>
193194 * {@code
194195 *
@@ -201,6 +202,8 @@ public static RegexScalar.Builder newRegexScalar(String name) {
201202 * <p>
202203 * A future version of the graphql specification may add this capability but in the meantime you can use this facility.
203204 *
205+ * @param name the name of the aliased scalar
206+ *
204207 * @return a builder of a aliased scalar
205208 */
206209 public static AliasedScalar .Builder newAliasedScalar (String name ) {
0 commit comments