From 90398d72a600d134cb5b487cdb7cfffbe9cb3ba3 Mon Sep 17 00:00:00 2001 From: Dariusz Kuc <9501705+dariuszkuc@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:43:01 -0500 Subject: [PATCH] chore: update to latest dependencies (#1950) --- .../build.gradle.kts | 2 +- .../build.gradle.kts | 2 +- .../FederatedSchemaGeneratorTest.kt | 8 +++- .../FederatedSchemaV2GeneratorTest.kt | 5 +- .../compose/ComposeDirectiveTest.kt | 3 ++ .../contact/ContactDirectiveTest.kt | 5 +- .../directives/link/LinkDirectiveTest.kt | 5 +- .../directives/policy/PolicyDirectiveTest.kt | 3 ++ .../RequiresScopesDirectiveTest.kt | 3 ++ .../extensions/GraphQLSchemaExtensionsTest.kt | 5 +- gradle/libs.versions.toml | 48 ++++++++++--------- gradle/wrapper/gradle-wrapper.properties | 2 +- .../integration/resources/sdl/custom.graphql | 3 ++ .../resources/sdl/federated.graphql | 3 ++ .../integration/resources/sdl/schema.graphql | 3 ++ .../plugin/maven/GenerateSDLMojoTest.kt | 3 ++ .../plugin/maven/GenerateSDLMojoTest.kt | 3 ++ .../plugin/maven/GenerateSDLMojoTest.kt | 3 ++ .../wiremock/__files/testSchema.graphql | 2 + .../build.gradle.kts | 2 +- .../plugin/client/IntrospectSchemaTest.kt | 5 +- .../build.gradle.kts | 2 +- .../plugin/schema/GenerateCustomSDLTest.kt | 3 ++ .../graphql/plugin/schema/GenerateSDLTest.kt | 5 +- .../graphql/server/ktor/GraphQLPluginTest.kt | 5 +- .../spring/GraphQLConfigurationProperties.kt | 26 ++++++---- .../spring/GraphQLSchemaConfiguration.kt | 4 +- .../spring/routes/RouteConfigurationIT.kt | 5 +- 28 files changed, 120 insertions(+), 48 deletions(-) diff --git a/clients/graphql-kotlin-ktor-client/build.gradle.kts b/clients/graphql-kotlin-ktor-client/build.gradle.kts index e1eaf3a7fe..4fe5092a15 100644 --- a/clients/graphql-kotlin-ktor-client/build.gradle.kts +++ b/clients/graphql-kotlin-ktor-client/build.gradle.kts @@ -13,7 +13,7 @@ dependencies { testImplementation(projects.graphqlKotlinClientJackson) testImplementation(libs.ktor.client.logging) testImplementation(libs.ktor.client.okhttp) - testImplementation(libs.wiremock.jre8) + testImplementation(libs.wiremock.lib) } tasks { diff --git a/clients/graphql-kotlin-spring-client/build.gradle.kts b/clients/graphql-kotlin-spring-client/build.gradle.kts index f39ff997b4..ce816c8ecd 100644 --- a/clients/graphql-kotlin-spring-client/build.gradle.kts +++ b/clients/graphql-kotlin-spring-client/build.gradle.kts @@ -12,7 +12,7 @@ dependencies { api(libs.spring.webflux) api(libs.spring.boot.netty) testImplementation(projects.graphqlKotlinClientSerialization) - testImplementation(libs.wiremock.jre8) + testImplementation(libs.wiremock.lib) } tasks { diff --git a/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/FederatedSchemaGeneratorTest.kt b/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/FederatedSchemaGeneratorTest.kt index 85fc27db43..291a02ac97 100644 --- a/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/FederatedSchemaGeneratorTest.kt +++ b/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/FederatedSchemaGeneratorTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Expedia, Inc + * Copyright 2024 Expedia, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,6 +60,9 @@ class FederatedSchemaGeneratorTest { "Space separated list of primary keys needed to access federated object" directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE + "Indicates an Input Object is a OneOf Input Object." + directive @oneOf on INPUT_OBJECT + "Specifies the base type field set that will be selectable by the gateway" directive @provides(fields: _FieldSet!) on FIELD_DEFINITION @@ -179,6 +182,9 @@ class FederatedSchemaGeneratorTest { "Space separated list of primary keys needed to access federated object" directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE + "Indicates an Input Object is a OneOf Input Object." + directive @oneOf on INPUT_OBJECT + "Specifies the base type field set that will be selectable by the gateway" directive @provides(fields: _FieldSet!) on FIELD_DEFINITION diff --git a/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/FederatedSchemaV2GeneratorTest.kt b/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/FederatedSchemaV2GeneratorTest.kt index d9596954d7..089b101c68 100644 --- a/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/FederatedSchemaV2GeneratorTest.kt +++ b/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/FederatedSchemaV2GeneratorTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Expedia, Inc + * Copyright 2024 Expedia, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,6 +57,9 @@ class FederatedSchemaV2GeneratorTest { "Links definitions within the document to external schemas." directive @link(as: String, import: [link__Import], url: String!) repeatable on SCHEMA + "Indicates an Input Object is a OneOf Input Object." + directive @oneOf on INPUT_OBJECT + "Specifies the base type field set that will be selectable by the gateway" directive @provides(fields: FieldSet!) on FIELD_DEFINITION diff --git a/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/compose/ComposeDirectiveTest.kt b/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/compose/ComposeDirectiveTest.kt index df775fe945..a29d5a508c 100644 --- a/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/compose/ComposeDirectiveTest.kt +++ b/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/compose/ComposeDirectiveTest.kt @@ -70,6 +70,9 @@ class ComposeDirectiveTest { "Links definitions within the document to external schemas." directive @link(as: String, import: [link__Import], url: String!) repeatable on SCHEMA + "Indicates an Input Object is a OneOf Input Object." + directive @oneOf on INPUT_OBJECT + "Directs the executor to skip this field or fragment when the `if` argument is true." directive @skip( "Skipped when true." diff --git a/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/contact/ContactDirectiveTest.kt b/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/contact/ContactDirectiveTest.kt index 61a32e11ea..3ad4faa547 100644 --- a/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/contact/ContactDirectiveTest.kt +++ b/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/contact/ContactDirectiveTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Expedia, Inc + * Copyright 2024 Expedia, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,6 +52,9 @@ class ContactDirectiveTest { "Links definitions within the document to external schemas." directive @link(as: String, import: [link__Import], url: String!) repeatable on SCHEMA + "Indicates an Input Object is a OneOf Input Object." + directive @oneOf on INPUT_OBJECT + "Directs the executor to skip this field or fragment when the `if` argument is true." directive @skip( "Skipped when true." diff --git a/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/link/LinkDirectiveTest.kt b/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/link/LinkDirectiveTest.kt index 71baf75d61..0bd131a301 100644 --- a/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/link/LinkDirectiveTest.kt +++ b/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/link/LinkDirectiveTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Expedia, Inc + * Copyright 2024 Expedia, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -67,6 +67,9 @@ class LinkDirectiveTest { "Space separated list of primary keys needed to access federated object" directive @myKey(fields: fed__FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + "Indicates an Input Object is a OneOf Input Object." + directive @oneOf on INPUT_OBJECT + "Directs the executor to skip this field or fragment when the `if` argument is true." directive @skip( "Skipped when true." diff --git a/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/policy/PolicyDirectiveTest.kt b/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/policy/PolicyDirectiveTest.kt index b2b5029c51..2b0986be0d 100644 --- a/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/policy/PolicyDirectiveTest.kt +++ b/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/policy/PolicyDirectiveTest.kt @@ -57,6 +57,9 @@ class PolicyDirectiveTest { "Links definitions within the document to external schemas." directive @link(as: String, import: [link__Import], url: String!) repeatable on SCHEMA + "Indicates an Input Object is a OneOf Input Object." + directive @oneOf on INPUT_OBJECT + "Directs the executor to skip this field or fragment when the `if` argument is true." directive @skip( "Skipped when true." diff --git a/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/requiresscope/RequiresScopesDirectiveTest.kt b/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/requiresscope/RequiresScopesDirectiveTest.kt index e98ff665b6..224a002d2a 100644 --- a/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/requiresscope/RequiresScopesDirectiveTest.kt +++ b/generator/graphql-kotlin-federation/src/test/kotlin/com/expediagroup/graphql/generator/federation/directives/requiresscope/RequiresScopesDirectiveTest.kt @@ -57,6 +57,9 @@ class RequiresScopesDirectiveTest { "Links definitions within the document to external schemas." directive @link(as: String, import: [link__Import], url: String!) repeatable on SCHEMA + "Indicates an Input Object is a OneOf Input Object." + directive @oneOf on INPUT_OBJECT + "Directs the executor to skip this field or fragment when the `if` argument is true." directive @skip( "Skipped when true." diff --git a/generator/graphql-kotlin-schema-generator/src/test/kotlin/com/expediagroup/graphql/generator/extensions/GraphQLSchemaExtensionsTest.kt b/generator/graphql-kotlin-schema-generator/src/test/kotlin/com/expediagroup/graphql/generator/extensions/GraphQLSchemaExtensionsTest.kt index 0cf05afea5..aa50e63ae5 100644 --- a/generator/graphql-kotlin-schema-generator/src/test/kotlin/com/expediagroup/graphql/generator/extensions/GraphQLSchemaExtensionsTest.kt +++ b/generator/graphql-kotlin-schema-generator/src/test/kotlin/com/expediagroup/graphql/generator/extensions/GraphQLSchemaExtensionsTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Expedia, Inc + * Copyright 2024 Expedia, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -270,6 +270,9 @@ class GraphQLSchemaExtensionsTest { if: Boolean! ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT + "Indicates an Input Object is a OneOf Input Object." + directive @oneOf on INPUT_OBJECT + "Directs the executor to skip this field or fragment when the `if` argument is true." directive @skip( "Skipped when true." diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9ec7390727..65dfbb199a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,48 +1,52 @@ [versions] android-plugin = "8.1.1" -classgraph = "4.8.162" -dataloader = "3.2.0" -federation = "4.1.0" -graphql-java = "21.1" -graalvm = "0.9.28" -jackson = "2.15.2" +classgraph = "4.8.170" +dataloader = "3.2.2" +federation = "4.4.1" +graphql-java = "21.5" +graalvm = "0.10.1" +jackson = "2.15.4" # kotlin version has to match the compile-testing compiler version kotlin = "1.8.22" # TODO kotlin 1.9 upgrade -> kotlinx-benchaamrk 0.4.9+ uses kotlin 1.9 kotlinx-benchmark = "0.4.8" +# TODO kotlin 1.9 upgrade -> kotlinx-coroutines 1.8+ uses kotlin 1.9 kotlinx-coroutines = "1.7.3" # TODO kotlin 1.9 upgrade -> kotlinx-serialization 1.6.0+ uses kotlin 1.9 kotlinx-serialization = "1.5.1" -ktor = "2.3.7" -maven-plugin-annotation = "3.9.0" -maven-plugin-api = "3.9.4" +ktor = "2.3.10" +maven-plugin-annotation = "3.12.0" +maven-plugin-api = "3.9.6" maven-project = "2.2.1" +# TODO kotlin 1.9 upgrade -> kotlinxpoet 1.15+ uses kotlin 1.9 poet = "1.14.2" ## reactor and spring versions should be the same as defined in spring-boot-dependencies -reactor-core = "3.5.9" +reactor-core = "3.5.15" reactor-extensions = "1.2.2" -slf4j = "2.0.7" -spring = "6.0.11" -spring-boot = "3.1.2" +slf4j = "2.0.12" +spring = "6.0.18" +# TODO kotlin 1.9 upgrade -> spring boot 3.2+ uses kotlin 1.9 +spring-boot = "3.1.10" # test dependencies compile-testing = "0.3.2" -icu = "73.2" -junit = "5.10.0" -logback = "1.4.11" +icu = "74.2" +junit = "5.10.2" +logback = "1.5.4" +# TODO kotlin 1.9 upgrade -> mockk 1.13.8+ uses kotlin 1.9 mockk = "1.13.7" -rxjava = "3.1.7" -wiremock = "3.0.1" +rxjava = "3.1.8" +wiremock = "3.5.2" # plugins # TODO kotlin 1.9 upgrade -> detekt 1.23.1+ uses kotlin 1.9 detekt = "1.23.0" dokka = "1.8.20" -jacoco = "0.8.10" +jacoco = "0.8.12" # klint gradle plugin breaks with 0.46.x+ ktlint-core = "0.45.2" ktlint-plugin = "10.3.0" -maven-plugin-development = "0.4.2" +maven-plugin-development = "0.4.3" nexus-publish-plugin = "1.3.0" plugin-publish = "1.2.1" @@ -109,8 +113,8 @@ reactor-extensions = { group = "io.projectreactor.kotlin", name = "reactor-kotli reactor-test = { group = "io.projectreactor", name = "reactor-test", version.ref = "reactor-core" } rxjava = { group = "io.reactivex.rxjava3", name = "rxjava", version.ref = "rxjava" } spring-boot-test = { group = "org.springframework.boot", name = "spring-boot-starter-test", version.ref = "spring-boot" } -wiremock-jre8 = { group = "com.github.tomakehurst", name = "wiremock-jre8", version.ref = "wiremock" } -wiremock-standalone = { group = "com.github.tomakehurst", name = "wiremock-jre8-standalone", version.ref = "wiremock" } +wiremock-lib = { group = "org.wiremock", name = "wiremock", version.ref = "wiremock" } +wiremock-standalone = { group = "org.wiremock", name = "wiremock-standalone", version.ref = "wiremock" } # build src plugin libraries detekt-plugin = { group = "io.gitlab.arturbosch.detekt", name = "detekt-gradle-plugin", version.ref = "detekt" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3fa8f862f7..b82aa23a4f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/integration/gradle-plugin-integration-tests/src/integration/resources/sdl/custom.graphql b/integration/gradle-plugin-integration-tests/src/integration/resources/sdl/custom.graphql index dd55038ec7..81078fa506 100644 --- a/integration/gradle-plugin-integration-tests/src/integration/resources/sdl/custom.graphql +++ b/integration/gradle-plugin-integration-tests/src/integration/resources/sdl/custom.graphql @@ -17,6 +17,9 @@ directive @include( "Links definitions within the document to external schemas." directive @link(as: String, import: [link__Import], url: String!) repeatable on SCHEMA +"Indicates an Input Object is a OneOf Input Object." +directive @oneOf on INPUT_OBJECT + "Directs the executor to skip this field or fragment when the `if` argument is true." directive @skip( "Skipped when true." diff --git a/integration/gradle-plugin-integration-tests/src/integration/resources/sdl/federated.graphql b/integration/gradle-plugin-integration-tests/src/integration/resources/sdl/federated.graphql index 3ac4db1e7b..b28269bb5c 100644 --- a/integration/gradle-plugin-integration-tests/src/integration/resources/sdl/federated.graphql +++ b/integration/gradle-plugin-integration-tests/src/integration/resources/sdl/federated.graphql @@ -17,6 +17,9 @@ directive @include( "Links definitions within the document to external schemas." directive @link(as: String, import: [link__Import], url: String!) repeatable on SCHEMA +"Indicates an Input Object is a OneOf Input Object." +directive @oneOf on INPUT_OBJECT + "Directs the executor to skip this field or fragment when the `if` argument is true." directive @skip( "Skipped when true." diff --git a/integration/gradle-plugin-integration-tests/src/integration/resources/sdl/schema.graphql b/integration/gradle-plugin-integration-tests/src/integration/resources/sdl/schema.graphql index 1c2ff2bee7..f8cba5175a 100644 --- a/integration/gradle-plugin-integration-tests/src/integration/resources/sdl/schema.graphql +++ b/integration/gradle-plugin-integration-tests/src/integration/resources/sdl/schema.graphql @@ -14,6 +14,9 @@ directive @include( if: Boolean! ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT +"Indicates an Input Object is a OneOf Input Object." +directive @oneOf on INPUT_OBJECT + "Directs the executor to skip this field or fragment when the `if` argument is true." directive @skip( "Skipped when true." diff --git a/integration/maven-plugin-integration-tests/integration/generate-sdl-federated/src/test/kotlin/com/expediagroup/graphql/plugin/maven/GenerateSDLMojoTest.kt b/integration/maven-plugin-integration-tests/integration/generate-sdl-federated/src/test/kotlin/com/expediagroup/graphql/plugin/maven/GenerateSDLMojoTest.kt index d97809b0f7..f5a6f3a15e 100755 --- a/integration/maven-plugin-integration-tests/integration/generate-sdl-federated/src/test/kotlin/com/expediagroup/graphql/plugin/maven/GenerateSDLMojoTest.kt +++ b/integration/maven-plugin-integration-tests/integration/generate-sdl-federated/src/test/kotlin/com/expediagroup/graphql/plugin/maven/GenerateSDLMojoTest.kt @@ -55,6 +55,9 @@ class GenerateSDLMojoTest { "Links definitions within the document to external schemas." directive @link(as: String, import: [link__Import], url: String!) repeatable on SCHEMA + "Indicates an Input Object is a OneOf Input Object." + directive @oneOf on INPUT_OBJECT + "Directs the executor to skip this field or fragment when the `if` argument is true." directive @skip( "Skipped when true." diff --git a/integration/maven-plugin-integration-tests/integration/generate-sdl-hooks/src/test/kotlin/com/expediagroup/graphql/plugin/maven/GenerateSDLMojoTest.kt b/integration/maven-plugin-integration-tests/integration/generate-sdl-hooks/src/test/kotlin/com/expediagroup/graphql/plugin/maven/GenerateSDLMojoTest.kt index aaaac85aa7..323931bf2e 100755 --- a/integration/maven-plugin-integration-tests/integration/generate-sdl-hooks/src/test/kotlin/com/expediagroup/graphql/plugin/maven/GenerateSDLMojoTest.kt +++ b/integration/maven-plugin-integration-tests/integration/generate-sdl-hooks/src/test/kotlin/com/expediagroup/graphql/plugin/maven/GenerateSDLMojoTest.kt @@ -55,6 +55,9 @@ class GenerateSDLMojoTest { "Links definitions within the document to external schemas." directive @link(as: String, import: [link__Import], url: String!) repeatable on SCHEMA + "Indicates an Input Object is a OneOf Input Object." + directive @oneOf on INPUT_OBJECT + "Directs the executor to skip this field or fragment when the `if` argument is true." directive @skip( "Skipped when true." diff --git a/integration/maven-plugin-integration-tests/integration/generate-sdl/src/test/kotlin/com/expediagroup/graphql/plugin/maven/GenerateSDLMojoTest.kt b/integration/maven-plugin-integration-tests/integration/generate-sdl/src/test/kotlin/com/expediagroup/graphql/plugin/maven/GenerateSDLMojoTest.kt index 486ef21d59..ad9d7bbb36 100755 --- a/integration/maven-plugin-integration-tests/integration/generate-sdl/src/test/kotlin/com/expediagroup/graphql/plugin/maven/GenerateSDLMojoTest.kt +++ b/integration/maven-plugin-integration-tests/integration/generate-sdl/src/test/kotlin/com/expediagroup/graphql/plugin/maven/GenerateSDLMojoTest.kt @@ -52,6 +52,9 @@ class GenerateSDLMojoTest { if: Boolean! ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT + "Indicates an Input Object is a OneOf Input Object." + directive @oneOf on INPUT_OBJECT + "Directs the executor to skip this field or fragment when the `if` argument is true." directive @skip( "Skipped when true." diff --git a/integration/maven-plugin-integration-tests/integration/wiremock/__files/testSchema.graphql b/integration/maven-plugin-integration-tests/integration/wiremock/__files/testSchema.graphql index dd8d34d0d4..ea55b3e433 100755 --- a/integration/maven-plugin-integration-tests/integration/wiremock/__files/testSchema.graphql +++ b/integration/maven-plugin-integration-tests/integration/wiremock/__files/testSchema.graphql @@ -7,6 +7,8 @@ directive @include( "Included when true." if: Boolean! ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT +"Indicates an Input Object is a OneOf Input Object." +directive @oneOf on INPUT_OBJECT "Directs the executor to skip this field or fragment when the `if` argument is true." directive @skip( "Skipped when true." diff --git a/plugins/client/graphql-kotlin-client-generator/build.gradle.kts b/plugins/client/graphql-kotlin-client-generator/build.gradle.kts index 16fa49f018..7516c42157 100644 --- a/plugins/client/graphql-kotlin-client-generator/build.gradle.kts +++ b/plugins/client/graphql-kotlin-client-generator/build.gradle.kts @@ -21,7 +21,7 @@ dependencies { implementation(libs.slf4j) testImplementation(projects.graphqlKotlinClientJackson) testImplementation(projects.graphqlKotlinClientSerialization) - testImplementation(libs.wiremock.jre8) + testImplementation(libs.wiremock.lib) testImplementation(libs.compile.testing) { // there is no kotlin compile testing release supporting kotlin 1.8.22 // explicitly downgrading kotlin version to match project version diff --git a/plugins/client/graphql-kotlin-client-generator/src/test/kotlin/com/expediagroup/graphql/plugin/client/IntrospectSchemaTest.kt b/plugins/client/graphql-kotlin-client-generator/src/test/kotlin/com/expediagroup/graphql/plugin/client/IntrospectSchemaTest.kt index 030c362ffb..91752cf2e2 100755 --- a/plugins/client/graphql-kotlin-client-generator/src/test/kotlin/com/expediagroup/graphql/plugin/client/IntrospectSchemaTest.kt +++ b/plugins/client/graphql-kotlin-client-generator/src/test/kotlin/com/expediagroup/graphql/plugin/client/IntrospectSchemaTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022 Expedia, Inc + * Copyright 2024 Expedia, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -59,6 +59,9 @@ class IntrospectSchemaTest { if: Boolean! ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT + "Indicates an Input Object is a OneOf Input Object." + directive @oneOf on INPUT_OBJECT + "Directs the executor to skip this field or fragment when the `if` argument is true." directive @skip( "Skipped when true." diff --git a/plugins/graphql-kotlin-gradle-plugin/build.gradle.kts b/plugins/graphql-kotlin-gradle-plugin/build.gradle.kts index c7a376d81e..bcd0744e01 100644 --- a/plugins/graphql-kotlin-gradle-plugin/build.gradle.kts +++ b/plugins/graphql-kotlin-gradle-plugin/build.gradle.kts @@ -15,7 +15,7 @@ dependencies { compileOnly(projects.graphqlKotlinSdlGenerator) compileOnly(projects.graphqlKotlinGraalvmMetadataGenerator) - testImplementation(libs.wiremock.jre8) + testImplementation(libs.wiremock.lib) testImplementation(libs.junit.params) } diff --git a/plugins/schema/graphql-kotlin-sdl-generator/src/integrationTest/kotlin/com/expediagroup/graphql/plugin/schema/GenerateCustomSDLTest.kt b/plugins/schema/graphql-kotlin-sdl-generator/src/integrationTest/kotlin/com/expediagroup/graphql/plugin/schema/GenerateCustomSDLTest.kt index 9a078fb65f..a5e9889d77 100644 --- a/plugins/schema/graphql-kotlin-sdl-generator/src/integrationTest/kotlin/com/expediagroup/graphql/plugin/schema/GenerateCustomSDLTest.kt +++ b/plugins/schema/graphql-kotlin-sdl-generator/src/integrationTest/kotlin/com/expediagroup/graphql/plugin/schema/GenerateCustomSDLTest.kt @@ -44,6 +44,9 @@ class GenerateCustomSDLTest { "Links definitions within the document to external schemas." directive @link(as: String, import: [link__Import], url: String!) repeatable on SCHEMA + "Indicates an Input Object is a OneOf Input Object." + directive @oneOf on INPUT_OBJECT + "Directs the executor to skip this field or fragment when the `if` argument is true." directive @skip( "Skipped when true." diff --git a/plugins/schema/graphql-kotlin-sdl-generator/src/test/kotlin/com/expediagroup/graphql/plugin/schema/GenerateSDLTest.kt b/plugins/schema/graphql-kotlin-sdl-generator/src/test/kotlin/com/expediagroup/graphql/plugin/schema/GenerateSDLTest.kt index 1f7889e8cc..0377203455 100644 --- a/plugins/schema/graphql-kotlin-sdl-generator/src/test/kotlin/com/expediagroup/graphql/plugin/schema/GenerateSDLTest.kt +++ b/plugins/schema/graphql-kotlin-sdl-generator/src/test/kotlin/com/expediagroup/graphql/plugin/schema/GenerateSDLTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022 Expedia, Inc + * Copyright 2024 Expedia, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,6 +42,9 @@ class GenerateSDLTest { if: Boolean! ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT + "Indicates an Input Object is a OneOf Input Object." + directive @oneOf on INPUT_OBJECT + "Directs the executor to skip this field or fragment when the `if` argument is true." directive @skip( "Skipped when true." diff --git a/servers/graphql-kotlin-ktor-server/src/test/kotlin/com/expediagroup/graphql/server/ktor/GraphQLPluginTest.kt b/servers/graphql-kotlin-ktor-server/src/test/kotlin/com/expediagroup/graphql/server/ktor/GraphQLPluginTest.kt index a40d0e9cde..db2d17cfb0 100644 --- a/servers/graphql-kotlin-ktor-server/src/test/kotlin/com/expediagroup/graphql/server/ktor/GraphQLPluginTest.kt +++ b/servers/graphql-kotlin-ktor-server/src/test/kotlin/com/expediagroup/graphql/server/ktor/GraphQLPluginTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Expedia, Inc + * Copyright 2024 Expedia, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -80,6 +80,9 @@ class GraphQLPluginTest { if: Boolean! ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT + "Indicates an Input Object is a OneOf Input Object." + directive @oneOf on INPUT_OBJECT + "Directs the executor to skip this field or fragment when the `if` argument is true." directive @skip( "Skipped when true." diff --git a/servers/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/server/spring/GraphQLConfigurationProperties.kt b/servers/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/server/spring/GraphQLConfigurationProperties.kt index c48bb020ff..7fbbc90fdf 100644 --- a/servers/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/server/spring/GraphQLConfigurationProperties.kt +++ b/servers/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/server/spring/GraphQLConfigurationProperties.kt @@ -98,11 +98,6 @@ data class GraphQLConfigurationProperties( val protocol: SubscriptionProtocol = SubscriptionProtocol.GRAPHQL_WS ) - enum class SubscriptionProtocol { - APOLLO_SUBSCRIPTIONS_WS, - GRAPHQL_WS - } - /** * Playground configuration properties. */ @@ -141,11 +136,6 @@ data class GraphQLConfigurationProperties( val enabled: Boolean = true ) - /** - * Approaches for batching transactions of a set of GraphQL Operations. - */ - enum class BatchingStrategy { LEVEL_DISPATCHED, SYNC_EXHAUSTION } - /** * Batching configuration properties. */ @@ -161,3 +151,19 @@ data class GraphQLConfigurationProperties( val enabled: Boolean = false ) } + +// workaround to Spring GraalVM native issue +// when using nested configuration enum classes Spring Boot is unable to bind them correctly + +enum class SubscriptionProtocol { + APOLLO_SUBSCRIPTIONS_WS, + GRAPHQL_WS +} + +/** + * Approaches for batching transactions of a set of GraphQL Operations. + */ +enum class BatchingStrategy { + LEVEL_DISPATCHED, + SYNC_EXHAUSTION +} diff --git a/servers/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/server/spring/GraphQLSchemaConfiguration.kt b/servers/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/server/spring/GraphQLSchemaConfiguration.kt index 07471e2b99..d35600f702 100644 --- a/servers/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/server/spring/GraphQLSchemaConfiguration.kt +++ b/servers/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/server/spring/GraphQLSchemaConfiguration.kt @@ -91,8 +91,8 @@ class GraphQLSchemaConfiguration { builder.doNotAddDefaultInstrumentations() instrumentations.add( when (config.batching.strategy) { - GraphQLConfigurationProperties.BatchingStrategy.LEVEL_DISPATCHED -> DataLoaderLevelDispatchedInstrumentation() - GraphQLConfigurationProperties.BatchingStrategy.SYNC_EXHAUSTION -> DataLoaderSyncExecutionExhaustedInstrumentation() + BatchingStrategy.LEVEL_DISPATCHED -> DataLoaderLevelDispatchedInstrumentation() + BatchingStrategy.SYNC_EXHAUSTION -> DataLoaderSyncExecutionExhaustedInstrumentation() } ) } diff --git a/servers/graphql-kotlin-spring-server/src/test/kotlin/com/expediagroup/graphql/server/spring/routes/RouteConfigurationIT.kt b/servers/graphql-kotlin-spring-server/src/test/kotlin/com/expediagroup/graphql/server/spring/routes/RouteConfigurationIT.kt index f9a9b1addb..e59eb9b991 100644 --- a/servers/graphql-kotlin-spring-server/src/test/kotlin/com/expediagroup/graphql/server/spring/routes/RouteConfigurationIT.kt +++ b/servers/graphql-kotlin-spring-server/src/test/kotlin/com/expediagroup/graphql/server/spring/routes/RouteConfigurationIT.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Expedia, Inc + * Copyright 2024 Expedia, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -85,6 +85,9 @@ class RouteConfigurationIT(@Autowired private val testClient: WebTestClient) { if: Boolean! ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT + "Indicates an Input Object is a OneOf Input Object." + directive @oneOf on INPUT_OBJECT + "Directs the executor to skip this field or fragment when the `if` argument is true." directive @skip( "Skipped when true."