diff --git a/website/docs/plugins/gradle-plugin-usage-graalvm.mdx b/website/docs/plugins/gradle-plugin-usage-graalvm.mdx index b5d835dd8f..1467d315c2 100644 --- a/website/docs/plugins/gradle-plugin-usage-graalvm.mdx +++ b/website/docs/plugins/gradle-plugin-usage-graalvm.mdx @@ -42,7 +42,7 @@ fun Application.graphQLModule() { typeHierarchy = mapOf() } } - install(Routing) { + routing { graphQLPostRoute() graphiQLRoute() } @@ -65,14 +65,14 @@ values={[ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("jvm") version "1.7.21" + kotlin("jvm") version "2.3.0" application } dependencies { implementation("com.expediagroup", "graphql-kotlin-ktor-server", $latestGraphQLKotlinVersion) implementation("ch.qos.logback", "logback-classic", "1.4.7") - implementation("io.ktor", "ktor-client-cio", "2.2.4") + implementation("io.ktor", "ktor-client-cio", "3.4.1") } tasks.withType { @@ -92,7 +92,7 @@ import com.expediagroup.graphql.plugin.gradle.graphql import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("jvm") version "1.7.21" + kotlin("jvm") version "2.3.0" application id("org.graalvm.buildtools.native") version "0.9.21" // (1) id("com.expediagroup.graphql") version $latestGraphQLKotlinVersion // (2) @@ -101,7 +101,7 @@ plugins { dependencies { implementation("com.expediagroup", "graphql-kotlin-ktor-server", $latestGraphQLKotlinVersion) implementation("ch.qos.logback", "logback-classic", "1.4.7") - implementation("io.ktor", "ktor-client-cio", "2.2.4") + implementation("io.ktor", "ktor-client-cio", "3.4.1") } tasks.withType { @@ -194,9 +194,9 @@ values={[ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("jvm") version "1.7.21" - kotlin("plugin.spring") version "1.7.21" - id("org.springframework.boot") version "3.0.5" + kotlin("jvm") version "2.3.0" + kotlin("plugin.spring") version "2.3.0" + id("org.springframework.boot") version "4.0.2" } dependencies { @@ -216,9 +216,9 @@ import com.expediagroup.graphql.plugin.gradle.graphql import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("jvm") version "1.7.21" - kotlin("plugin.spring") version "1.7.21" - id("org.springframework.boot") version "3.0.6" + kotlin("jvm") version "2.3.0" + kotlin("plugin.spring") version "2.3.0" + id("org.springframework.boot") version "4.0.2" id("org.graalvm.buildtools.native") version "0.9.21" // (1) id("com.expediagroup.graphql") version $latestGraphQLKotlinVersion // (2) } diff --git a/website/docs/plugins/maven-plugin-usage-graalvm.md b/website/docs/plugins/maven-plugin-usage-graalvm.md index fce220184a..b22aff794b 100644 --- a/website/docs/plugins/maven-plugin-usage-graalvm.md +++ b/website/docs/plugins/maven-plugin-usage-graalvm.md @@ -42,7 +42,7 @@ fun Application.graphQLModule() { typeHierarchy = mapOf() } } - install(Routing) { + routing { graphQLPostRoute() graphiQLRoute() } @@ -74,10 +74,10 @@ values={[ 17 - 1.7.22 + 2.3.0 ${latestGraphqlKotlinVersion} - 2.2.4 + 3.4.1 1.4.7 @@ -153,10 +153,10 @@ values={[ 17 - 1.7.22 + 2.3.0 ${latestGraphqlKotlinVersion} - 2.2.4 + 3.4.1 1.4.7 0.9.21 @@ -347,10 +347,10 @@ values={[ 17 - 1.7.22 + 2.3.0 ${latestGraphqlKotlinVersion} - 3.0.6 + 4.0.2 @@ -412,10 +412,10 @@ values={[ 17 - 1.7.22 + 2.3.0 ${latestGraphqlKotlinVersion} - 3.0.6 + 4.0.2 0.9.21 diff --git a/website/docs/schema-generator/execution/async-models.md b/website/docs/schema-generator/execution/async-models.md index 386df7b8be..eca5eacff7 100644 --- a/website/docs/schema-generator/execution/async-models.md +++ b/website/docs/schema-generator/execution/async-models.md @@ -111,7 +111,7 @@ class CustomFunctionDataFetcher(target: Any?, fn: KFunction<*>, objectMapper: Ob } class CustomDataFetcherFactoryProvider( - private val objectMapper: ObjectMapper + private val objectMapper: ObjectMapper = jacksonMapperBuilder().build() ) : SimpleKotlinDataFetcherFactoryProvider(objectMapper) { override fun functionDataFetcherFactory(target: Any?, kFunction: KFunction<*>): DataFetcherFactory = DataFetcherFactory { diff --git a/website/docs/server/data-loader/data-loader.md b/website/docs/server/data-loader/data-loader.md index 492e8f9550..d14e2b5933 100644 --- a/website/docs/server/data-loader/data-loader.md +++ b/website/docs/server/data-loader/data-loader.md @@ -3,7 +3,7 @@ id: data-loader title: Data Loaders --- Data Loaders are a popular caching pattern from the [JavaScript GraphQL implementation](https://github.com/graphql/dataloader). -`graphql-java` provides [support for this pattern](https://www.graphql-java.com/documentation/v16/batching/) +`graphql-java` provides [support for this pattern](https://www.graphql-java.com/documentation/batching/) using the `DataLoader` and `DataLoaderRegistry`. Since `graphql-kotlin` allows you to abstract the schema generation and data fetching code, you may not even need diff --git a/website/docs/server/ktor-server/ktor-http-request-response.md b/website/docs/server/ktor-server/ktor-http-request-response.md index cf1285a21f..e7964f353e 100644 --- a/website/docs/server/ktor-server/ktor-http-request-response.md +++ b/website/docs/server/ktor-server/ktor-http-request-response.md @@ -34,7 +34,7 @@ fun Application.myModule() { } } // install authenticated GraphQL routes - install(Routing) { + routing { authenticate("auth-basic") { graphQLPostRoute() } @@ -55,7 +55,7 @@ fun Application.myModule() { queries = listOf(TestQuery()) } } - install(Routing) { + routing { graphQLPostRoute() } diff --git a/website/docs/server/ktor-server/ktor-subscriptions.md b/website/docs/server/ktor-server/ktor-subscriptions.md index 428f360fb4..05d17e0156 100644 --- a/website/docs/server/ktor-server/ktor-subscriptions.md +++ b/website/docs/server/ktor-server/ktor-subscriptions.md @@ -31,7 +31,7 @@ from [The Guild](https://the-guild.dev/). This requires that your client send an See protocol documentation for expected messages. ```kotlin -install(Routing) { +routing { graphQLSubscriptionsRoute() } ``` diff --git a/website/docs/server/spring-server/spring-beans.md b/website/docs/server/spring-server/spring-beans.md index 528cbc8eb1..d2d7e4460e 100644 --- a/website/docs/server/spring-server/spring-beans.md +++ b/website/docs/server/spring-server/spring-beans.md @@ -9,7 +9,7 @@ Many of the beans are conditionally created and the default behavior can be cust | Bean | Description | |:---------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| DataFetcherExceptionHandler | GraphQL exception handler used from the various execution strategies, defaults to [SimpleDataFetcherExceptionHandler](https://www.graphql-java.com/documentation/v16/execution/) from graphql-java. | +| DataFetcherExceptionHandler | GraphQL exception handler used from the various execution strategies, defaults to [SimpleDataFetcherExceptionHandler](https://www.graphql-java.com/documentation/execution/) from graphql-java. | | KotlinDataFetcherFactoryProvider | Factory used during schema construction to obtain `DataFetcherFactory` that should be used for target function (using Spring aware `SpringDataFetcher`) and property resolution. | | KotlinDataLoader (optional) | Any number of beans created that implement `KotlinDataLoader`. See [Data Loaders](../data-loader/data-loader.md) for more details. | | KotlinDataLoaderRegistryFactory | A factory class that creates a `DataLoaderRegistry` of all the `KotlinDataLoaders`. Defaults to empty registry. | @@ -49,7 +49,7 @@ _Created only if federation is **enabled**_ | Bean | Description | |:--------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Instrumentation (optional) | Any number of beans created that implement `graphql-java` [Instrumentation](https://www.graphql-java.com/documentation/v16/instrumentation/) will be pulled in. The beans can be ordered by implementing the Spring `Ordered` interface. | +| Instrumentation (optional) | Any number of beans created that implement `graphql-java` [Instrumentation](https://www.graphql-java.com/documentation/instrumentation/) will be pulled in. The beans can be ordered by implementing the Spring `Ordered` interface. | | ExecutionIdProvider (optional) | Any number of beans created that implement `graphql-java` [ExecutionIdProvider](https://github.com/graphql-java/graphql-java/blob/master/src/main/java/graphql/execution/ExecutionIdProvider.java) will be pulled in. | | PreparsedDocumentProvider (optional) | Any number of beans created that implement `graphql-java` [PreparsedDocumentProvider](https://github.com/graphql-java/graphql-java/blob/master/src/main/java/graphql/execution/preparsed/PreparsedDocumentProvider.java) will be pulled in. | | GraphQL | GraphQL execution object generated using `GraphQLSchema` with default async execution strategies. The GraphQL object can be customized by optionally providing the above beans in the application context. |