|
1 | 1 | /* |
2 | | - * Copyright (c) 2020, 2022 Oracle and/or its affiliates. |
| 2 | + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
@@ -103,13 +103,13 @@ private CustomScalars() { |
103 | 103 | * An instance of a custom offset date/time scalar (with default formatting). |
104 | 104 | */ |
105 | 105 | static final GraphQLScalarType CUSTOM_OFFSET_DATE_TIME_SCALAR = |
106 | | - newOffsetDateTimeScalar(FORMATTED_OFFSET_DATETIME_SCALAR); |
| 106 | + newDateTimeScalar(FORMATTED_OFFSET_DATETIME_SCALAR); |
107 | 107 |
|
108 | 108 | /** |
109 | 109 | * An instance of a custom offset date/time scalar (with default formatting). |
110 | 110 | */ |
111 | 111 | static final GraphQLScalarType CUSTOM_ZONED_DATE_TIME_SCALAR = |
112 | | - newZonedDateTimeScalar(FORMATTED_ZONED_DATETIME_SCALAR); |
| 112 | + newDateTimeScalar(FORMATTED_ZONED_DATETIME_SCALAR); |
113 | 113 |
|
114 | 114 | /** |
115 | 115 | * An instance of a custom time scalar (with default formatting). |
@@ -137,40 +137,6 @@ static GraphQLScalarType newDateTimeScalar(String name) { |
137 | 137 | .build(); |
138 | 138 | } |
139 | 139 |
|
140 | | - /** |
141 | | - * Return a new custom offset date/time scalar. |
142 | | - * |
143 | | - * @param name the name of the scalar |
144 | | - * @return a new custom date/time scalar |
145 | | - */ |
146 | | - @SuppressWarnings("unchecked") |
147 | | - static GraphQLScalarType newOffsetDateTimeScalar(String name) { |
148 | | - GraphQLScalarType originalScalar = ExtendedScalars.DateTime; |
149 | | - |
150 | | - return GraphQLScalarType.newScalar() |
151 | | - .coercing(new DateTimeCoercing()) |
152 | | - .name(name) |
153 | | - .description("Custom: " + originalScalar.getDescription()) |
154 | | - .build(); |
155 | | - } |
156 | | - |
157 | | - /** |
158 | | - * Return a new custom zoned date/time scalar. |
159 | | - * |
160 | | - * @param name the name of the scalar |
161 | | - * @return a new custom date/time scalar |
162 | | - */ |
163 | | - @SuppressWarnings("unchecked") |
164 | | - static GraphQLScalarType newZonedDateTimeScalar(String name) { |
165 | | - GraphQLScalarType originalScalar = ExtendedScalars.DateTime; |
166 | | - |
167 | | - return GraphQLScalarType.newScalar() |
168 | | - .coercing(new DateTimeCoercing()) |
169 | | - .name(name) |
170 | | - .description("Custom: " + originalScalar.getDescription()) |
171 | | - .build(); |
172 | | - } |
173 | | - |
174 | 140 | /** |
175 | 141 | * Return a new custom time scalar. |
176 | 142 | * |
|
0 commit comments