Skip to content

Commit b36cc67

Browse files
committed
update docs to match change to any
1 parent f475b4a commit b36cc67

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

docs/client/client-customization.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,13 @@ val customObjectMapper = jacksonObjectMapper()
150150
val client = GraphQLClient(url = URL("http://localhost:8080/graphql"), mapper = customObjectMapper)
151151
```
152152

153-
## Deprecated Field Usage
153+
## Deprecated Field Usage
154154

155155
Build plugins will automatically fail generation of a client if any of the specified query files are referencing
156156
deprecated fields. This ensures that your clients have to explicitly opt-in into deprecated usage by specifying
157157
`allowDeprecatedFields` configuration option.
158158

159-
## Custom GraphQL Scalars
159+
## Custom GraphQL Scalars
160160

161161
By default, custom GraphQL scalars are serialized and [type-aliased](https://kotlinlang.org/docs/reference/type-aliases.html)
162162
to a String. GraphQL Kotlin plugins also support custom serialization based on provided configuration.
@@ -171,8 +171,8 @@ import com.expediagroup.graphql.client.converter.ScalarConverter
171171
import java.util.UUID
172172

173173
class UUIDScalarConverter : ScalarConverter<UUID> {
174-
override fun toScalar(rawValue: String): UUID = UUID.fromString(rawValue)
175-
override fun toJson(value: UUID): String = value.toString()
174+
override fun toScalar(rawValue: Any): UUID = UUID.fromString(rawValue.toString())
175+
override fun toJson(value: UUID): Any = value.toString()
176176
}
177177
```
178178

@@ -189,6 +189,4 @@ graphql {
189189
}
190190
```
191191

192-
See [Gradle](../plugins/gradle-plugin.md)
193-
and [Maven](../plugins/maven-plugin.md)
194-
plugin documentation for additional details.
192+
See [Gradle](../plugins/gradle-plugin.md) and [Maven](../plugins/maven-plugin.md) plugin documentation for additional details.

plugins/graphql-kotlin-plugin-core/src/test/kotlin/com/expediagroup/graphql/plugin/generator/types/GenerateGraphQLCustomScalarTypeSpecIT.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class GenerateGraphQLCustomScalarTypeSpecIT {
3636
import com.fasterxml.jackson.annotation.JsonCreator
3737
import com.fasterxml.jackson.annotation.JsonValue
3838
import kotlin.Any
39+
import kotlin.String
3940
import kotlin.jvm.JvmStatic
4041
4142
const val CUSTOM_SCALAR_TEST_QUERY: String =

0 commit comments

Comments
 (0)