@@ -21,8 +21,8 @@ import java.math.BigInteger
2121//
2222
2323private val GraphQLDeprecatedReasonArgument = GraphQLArgumentDefinition (" reason" ) {
24+ description = " The reason for the deprecation."
2425 type { GraphQLStringType }
25- description { " The reason for the deprecation." }
2626}
2727
2828/* *
@@ -31,7 +31,7 @@ private val GraphQLDeprecatedReasonArgument = GraphQLArgumentDefinition("reason"
3131 * @since 2.0.0
3232 */
3333val GraphQLDeprecatedDirective = GraphQLDirectiveDefinition (" deprecated" ) {
34- description { " Marks the field, argument, input field or enum value as deprecated." }
34+ description = " Marks the field, argument, input field or enum value as deprecated."
3535 argument(GraphQLDeprecatedReasonArgument )
3636 location(GraphQLDirectiveLocation .FIELD_DEFINITION )
3737 location(GraphQLDirectiveLocation .ENUM_VALUE )
@@ -40,8 +40,8 @@ val GraphQLDeprecatedDirective = GraphQLDirectiveDefinition("deprecated") {
4040}
4141
4242private val GraphQLSpecifiedByUrlArgument = GraphQLArgumentDefinition (" url" ) {
43+ description = " The URL that specifies the behaviour of this scalar."
4344 type { GraphQLStringType }
44- description { " The URL that specifies the behaviour of this scalar." }
4545}
4646
4747/* *
@@ -50,7 +50,7 @@ private val GraphQLSpecifiedByUrlArgument = GraphQLArgumentDefinition("url") {
5050 * @since 2.0.0
5151 */
5252val GraphQLSpecifiedByDirective = GraphQLDirectiveDefinition (" specifiedBy" ) {
53- description { " Exposes a URL that specifies the behaviour of this scalar." }
53+ description = " Exposes a URL that specifies the behaviour of this scalar."
5454 argument(GraphQLSpecifiedByUrlArgument )
5555 location(GraphQLDirectiveLocation .SCALAR )
5656}
@@ -59,10 +59,10 @@ val GraphQLSpecifiedByDirective = GraphQLDirectiveDefinition("specifiedBy") {
5959 * Directs the executor to include this field or fragment only when the `if` argument is true.
6060 */
6161val GraphQLIncludeDirective = GraphQLDirectiveDefinition (" include" ) {
62- description { " Directs the executor to include this field or fragment only when the `if` argument is true." }
62+ description = " Directs the executor to include this field or fragment only when the `if` argument is true."
6363 argument(" if" ) {
64+ description = " Included when true."
6465 type { GraphQLBooleanType }
65- description { " Included when true." }
6666 }
6767 location(GraphQLDirectiveLocation .FRAGMENT_SPREAD )
6868 location(GraphQLDirectiveLocation .INLINE_FRAGMENT )
@@ -73,10 +73,10 @@ val GraphQLIncludeDirective = GraphQLDirectiveDefinition("include") {
7373 * Directs the executor to skip this field or fragment when the `if`'argument is true.
7474 */
7575val GraphQLSkipDirective = GraphQLDirectiveDefinition (" skip" ) {
76- description { " Directs the executor to skip this field or fragment when the `if`'argument is true." }
76+ description = " Directs the executor to skip this field or fragment when the `if`'argument is true."
7777 argument(" if" ) {
78+ description = " Skipped when true."
7879 type { GraphQLBooleanType }
79- description { " Skipped when true." }
8080 }
8181 location(GraphQLDirectiveLocation .FRAGMENT_SPREAD )
8282 location(GraphQLDirectiveLocation .INLINE_FRAGMENT )
@@ -117,7 +117,7 @@ fun GraphQLMutableElementWithDirectives.specifiedBy(url: String) {
117117 * @since 2.0.0
118118 */
119119val GraphQLIntType : GraphQLScalarType <Int > = GraphQLScalarType (" Int" ) {
120- description { " Built-in Int (32-bit)" }
120+ description = " Built-in Int (32-bit)"
121121 decode {
122122 require(it is GraphQLInteger ) {
123123 " Expected GraphQLInteger but got ${it.javaClass.simpleName} "
@@ -135,7 +135,7 @@ val GraphQLIntType: GraphQLScalarType<Int> = GraphQLScalarType("Int") {
135135 * @since 2.0.0
136136 */
137137val GraphQLFloatType : GraphQLScalarType <Double > = GraphQLScalarType (" Float" ) {
138- description { " Built-in Float (64-bit)" }
138+ description = " Built-in Float (64-bit)"
139139 decode {
140140 when (it) {
141141 is GraphQLDecimal -> it.value.toDouble()
@@ -157,7 +157,7 @@ val GraphQLFloatType: GraphQLScalarType<Double> = GraphQLScalarType("Float") {
157157 * @since 2.0.0
158158 */
159159val GraphQLStringType : GraphQLScalarType <String > = GraphQLScalarType (" String" ) {
160- description { " Built-in String" }
160+ description = " Built-in String"
161161 decode {
162162 require(it is GraphQLString ) {
163163 " Expected GraphQLString but got ${it.javaClass.simpleName} "
@@ -175,7 +175,7 @@ val GraphQLStringType: GraphQLScalarType<String> = GraphQLScalarType("String") {
175175 * @since 2.0.0
176176 */
177177val GraphQLBooleanType : GraphQLScalarType <Boolean > = GraphQLScalarType (" Boolean" ) {
178- description { " Built-in Boolean" }
178+ description = " Built-in Boolean"
179179 decode {
180180 require(it is GraphQLBoolean ) {
181181 " Expected GraphQLBoolean but got ${it.javaClass.simpleName} "
@@ -193,7 +193,7 @@ val GraphQLBooleanType: GraphQLScalarType<Boolean> = GraphQLScalarType("Boolean"
193193 * @since 2.0.0
194194 */
195195val GraphQLIDType : GraphQLScalarType <String > = GraphQLScalarType (" ID" ) {
196- description { " Built-in ID" }
196+ description = " Built-in ID"
197197 decode {
198198 require(it is GraphQLString ) {
199199 " Expected GraphQLString but got ${it.javaClass.simpleName} "
@@ -213,8 +213,8 @@ val GraphQLIDType: GraphQLScalarType<String> = GraphQLScalarType("ID") {
213213 * @since 2.0.0
214214 */
215215val GraphQLLongType : GraphQLScalarType <Long > = GraphQLScalarType (" Long" ) {
216+ description = " Long"
216217 specifiedBy(" https://github.com" )
217- description { " Long" }
218218 decode {
219219 require(it is GraphQLInteger ) {
220220 " Expected GraphQLInteger but got ${it.javaClass.simpleName} "
@@ -232,7 +232,7 @@ val GraphQLLongType: GraphQLScalarType<Long> = GraphQLScalarType("Long") {
232232 * @since 2.0.0
233233 */
234234val GraphQLDecimalType : GraphQLScalarType <BigDecimal > = GraphQLScalarType (" Decimal" ) {
235- description { " Decimal" }
235+ description = " Decimal"
236236 decode {
237237 when (it) {
238238 is GraphQLDecimal -> it.value
@@ -253,7 +253,7 @@ val GraphQLDecimalType: GraphQLScalarType<BigDecimal> = GraphQLScalarType("Decim
253253 * @since 2.0.0
254254 */
255255val GraphQLIntegerType : GraphQLScalarType <BigInteger > = GraphQLScalarType (" Integer" ) {
256- description { " Integer" }
256+ description = " Integer"
257257 decode {
258258 require(it is GraphQLInteger ) {
259259 " Expected GraphQLInteger but got ${it.javaClass.simpleName} "
@@ -270,8 +270,8 @@ val GraphQLIntegerType: GraphQLScalarType<BigInteger> = GraphQLScalarType("Integ
270270 *
271271 * @since 2.0.0
272272 */
273- val GraphQLVoidType = GraphQLScalarType < Unit > (" Void" ) {
274- description { " Void" }
273+ val GraphQLVoidType = GraphQLScalarType (" Void" ) {
274+ description = " Void"
275275 decode { }
276276 encode { GraphQLBoolean (true ) }
277277}
0 commit comments