diff --git a/graphql-dgs-client/build.gradle.kts b/graphql-dgs-client/build.gradle.kts index 8f9985618..b86470742 100644 --- a/graphql-dgs-client/build.gradle.kts +++ b/graphql-dgs-client/build.gradle.kts @@ -36,9 +36,7 @@ dependencies { testImplementation("org.springframework.boot:spring-boot-starter-webflux") testImplementation("com.graphql-java:graphql-java-extended-scalars") testImplementation("io.projectreactor:reactor-test") - testImplementation(project(":graphql-dgs-subscriptions-graphql-sse-autoconfigure")) - testImplementation(project(":graphql-dgs-subscriptions-sse-autoconfigure")) - testImplementation(project(":graphql-dgs-subscriptions-websockets-autoconfigure")) - testImplementation(project(":graphql-dgs-spring-boot-oss-autoconfigure")) - testImplementation(project(":graphql-dgs-spring-webmvc-autoconfigure")) + + testImplementation(project(":graphql-dgs-spring-graphql-starter")) + testImplementation(project(":graphql-dgs-spring-graphql-starter-test")) } diff --git a/graphql-dgs-client/dependencies.lock b/graphql-dgs-client/dependencies.lock index 6294724c7..fed6fcc23 100644 --- a/graphql-dgs-client/dependencies.lock +++ b/graphql-dgs-client/dependencies.lock @@ -283,6 +283,7 @@ "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", "com.fasterxml.jackson.module:jackson-module-kotlin", "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, @@ -311,7 +312,7 @@ "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson:jackson-bom", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse", + "com.netflix.graphql.dgs:graphql-dgs-client", "org.springframework.boot:spring-boot-starter-json" ] }, @@ -320,8 +321,8 @@ "transitive": [ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-starter-json" ] }, @@ -330,18 +331,16 @@ "transitive": [ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", "org.springframework.boot:spring-boot-starter-json" ] }, @@ -381,15 +380,19 @@ "com.apollographql.federation:federation-graphql-java-support", "com.graphql-java:graphql-java-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test" ] }, "com.graphql-java:graphql-java-extended-scalars": { "locked": "22.0", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, @@ -405,23 +408,25 @@ "locked": "2.9.0", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.springframework.boot:spring-boot-starter-test" + "org.springframework.boot:spring-boot-starter-test", + "org.springframework.graphql:spring-graphql-test" ] }, "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-client": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -435,85 +440,57 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { "project": true, "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test": { "project": true, "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, @@ -522,7 +499,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -536,7 +513,8 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.graphql:spring-graphql" ] }, "io.micrometer:micrometer-commons": { @@ -553,7 +531,10 @@ ] }, "io.mockk:mockk": { - "locked": "1.13.13" + "locked": "1.13.13", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "io.mockk:mockk-agent": { "locked": "1.13.13", @@ -769,6 +750,12 @@ "io.netty:netty-transport-native-epoll" ] }, + "io.projectreactor.kotlin:reactor-kotlin-extensions": { + "locked": "1.2.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-reactive" + ] + }, "io.projectreactor.netty:reactor-netty-core": { "locked": "1.1.24", "transitive": [ @@ -784,19 +771,22 @@ "io.projectreactor:reactor-core": { "locked": "3.6.12", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse", + "io.projectreactor.kotlin:reactor-kotlin-extensions", "io.projectreactor.netty:reactor-netty-core", "io.projectreactor.netty:reactor-netty-http", "io.projectreactor:reactor-test", "org.jetbrains.kotlinx:kotlinx-coroutines-reactor", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test", "org.springframework:spring-webflux" ] }, "io.projectreactor:reactor-test": { "locked": "3.6.12", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, @@ -813,12 +803,6 @@ "org.springframework.boot:spring-boot-starter-tomcat" ] }, - "jakarta.servlet:jakarta.servlet-api": { - "locked": "6.0.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" - ] - }, "jakarta.xml.bind:jakarta.xml.bind-api": { "locked": "4.0.2", "transitive": [ @@ -871,12 +855,6 @@ "org.openjdk.jmh:jmh-core" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.commons:commons-math3": { "locked": "3.6.1", "transitive": [ @@ -947,7 +925,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -958,17 +935,14 @@ "locked": "2.0.21", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", "io.mockk:mockk-agent-jvm", @@ -995,6 +969,7 @@ "locked": "1.8.1", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-reactive", "io.mockk:mockk-dsl-jvm", "io.mockk:mockk-jvm", "org.jetbrains.kotlinx:kotlinx-coroutines-bom", @@ -1026,6 +1001,7 @@ "org.jetbrains:annotations": { "locked": "26.0.1", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "org.jetbrains.kotlin:kotlin-stdlib", "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm" ] @@ -1111,6 +1087,7 @@ "org.openjdk.jmh:jmh-core": { "locked": "1.37", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "org.openjdk.jmh:jmh-generator-annprocess", "org.openjdk.jmh:jmh-generator-asm", "org.openjdk.jmh:jmh-generator-bytecode", @@ -1118,7 +1095,10 @@ ] }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.37" + "locked": "1.37", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "org.openjdk.jmh:jmh-generator-asm": { "locked": "1.36", @@ -1127,7 +1107,10 @@ ] }, "org.openjdk.jmh:jmh-generator-bytecode": { - "locked": "1.36" + "locked": "1.36", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "org.openjdk.jmh:jmh-generator-reflection": { "locked": "1.36", @@ -1194,10 +1177,8 @@ "org.springframework.boot:spring-boot-autoconfigure": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "org.springframework.boot:spring-boot-starter", "org.springframework.boot:spring-boot-test-autoconfigure" ] @@ -1205,17 +1186,23 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test", "org.springframework.boot:spring-boot-starter-web", "org.springframework.boot:spring-boot-starter-webflux" ] }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, "org.springframework.boot:spring-boot-starter-json": { "locked": "3.3.6", "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-web", "org.springframework.boot:spring-boot-starter-webflux" ] @@ -1233,7 +1220,10 @@ ] }, "org.springframework.boot:spring-boot-starter-test": { - "locked": "3.3.6" + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "org.springframework.boot:spring-boot-starter-tomcat": { "locked": "3.3.6", @@ -1242,10 +1232,16 @@ ] }, "org.springframework.boot:spring-boot-starter-web": { - "locked": "3.3.6" + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "org.springframework.boot:spring-boot-starter-webflux": { - "locked": "3.3.6" + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "org.springframework.boot:spring-boot-test": { "locked": "3.3.6", @@ -1257,9 +1253,24 @@ "org.springframework.boot:spring-boot-test-autoconfigure": { "locked": "3.3.6", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.graphql:spring-graphql-test" + ] + }, + "org.springframework.graphql:spring-graphql-test": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ @@ -1282,6 +1293,8 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test", "org.springframework:spring-webmvc", "org.springframework:spring-websocket" ] @@ -1319,21 +1332,18 @@ "org.springframework:spring-test": { "locked": "6.1.15", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "org.springframework.boot:spring-boot-starter-test", - "org.springframework.boot:spring-boot-test" + "org.springframework.boot:spring-boot-test", + "org.springframework.graphql:spring-graphql-test" ] }, "org.springframework:spring-web": { "locked": "6.1.15", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-web", "org.springframework.boot:spring-boot-starter-webflux", @@ -1351,20 +1361,13 @@ "org.springframework:spring-webmvc": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure", "org.springframework.boot:spring-boot-starter-web" ] }, "org.springframework:spring-websocket": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, "org.xmlunit:xmlunit-core": { @@ -1979,6 +1982,7 @@ "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", "com.fasterxml.jackson.module:jackson-module-kotlin", "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, @@ -2007,6 +2011,7 @@ "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", "org.springframework.boot:spring-boot-starter-json" ] }, @@ -2014,19 +2019,22 @@ "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", "org.springframework.boot:spring-boot-starter-json" ] }, "com.fasterxml.jackson.module:jackson-module-kotlin": { "locked": "2.17.3", "transitive": [ - "com.fasterxml.jackson:jackson-bom" + "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", "org.springframework.boot:spring-boot-starter-json" ] }, @@ -2046,15 +2054,19 @@ "locked": "22.3", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test" ] }, "com.graphql-java:graphql-java-extended-scalars": { "locked": "22.0", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, @@ -2070,17 +2082,24 @@ "locked": "2.9.0", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.springframework.boot:spring-boot-starter-test" + "org.springframework.boot:spring-boot-starter-test", + "org.springframework.graphql:spring-graphql-test" ] }, "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-client": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -2094,58 +2113,56 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { "project": true, "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test": { "project": true, "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, @@ -2154,7 +2171,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -2177,7 +2194,10 @@ ] }, "io.mockk:mockk": { - "locked": "1.13.13" + "locked": "1.13.13", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "io.mockk:mockk-agent": { "locked": "1.13.13", @@ -2406,16 +2426,20 @@ "io.projectreactor:reactor-core": { "locked": "3.6.12", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", "io.projectreactor.netty:reactor-netty-core", "io.projectreactor.netty:reactor-netty-http", "io.projectreactor:reactor-test", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test", "org.springframework:spring-webflux" ] }, "io.projectreactor:reactor-test": { "locked": "3.6.12", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, @@ -2535,14 +2559,14 @@ "locked": "2.0.21", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", "io.mockk:mockk-agent-jvm", @@ -2555,6 +2579,7 @@ "org.jetbrains:annotations": { "locked": "26.0.1", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "org.jetbrains.kotlin:kotlin-stdlib" ] }, @@ -2674,15 +2699,23 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test", "org.springframework.boot:spring-boot-starter-web", "org.springframework.boot:spring-boot-starter-webflux" ] }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, "org.springframework.boot:spring-boot-starter-json": { "locked": "3.3.6", "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-web", "org.springframework.boot:spring-boot-starter-webflux" ] @@ -2700,7 +2733,10 @@ ] }, "org.springframework.boot:spring-boot-starter-test": { - "locked": "3.3.6" + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "org.springframework.boot:spring-boot-starter-tomcat": { "locked": "3.3.6", @@ -2709,10 +2745,16 @@ ] }, "org.springframework.boot:spring-boot-starter-web": { - "locked": "3.3.6" + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "org.springframework.boot:spring-boot-starter-webflux": { - "locked": "3.3.6" + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "org.springframework.boot:spring-boot-test": { "locked": "3.3.6", @@ -2727,6 +2769,19 @@ "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.graphql:spring-graphql-test" + ] + }, + "org.springframework.graphql:spring-graphql-test": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ @@ -2748,6 +2803,8 @@ "locked": "6.1.15", "transitive": [ "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test", "org.springframework:spring-webmvc" ] }, @@ -2783,13 +2840,16 @@ "org.springframework:spring-test": { "locked": "6.1.15", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "org.springframework.boot:spring-boot-starter-test", - "org.springframework.boot:spring-boot-test" + "org.springframework.boot:spring-boot-test", + "org.springframework.graphql:spring-graphql-test" ] }, "org.springframework:spring-web": { "locked": "6.1.15", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-web", "org.springframework.boot:spring-boot-starter-webflux", @@ -2842,6 +2902,7 @@ "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", "com.fasterxml.jackson.module:jackson-module-kotlin", "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, @@ -2870,6 +2931,7 @@ "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", "org.springframework.boot:spring-boot-starter-json" ] }, @@ -2877,19 +2939,22 @@ "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", "org.springframework.boot:spring-boot-starter-json" ] }, "com.fasterxml.jackson.module:jackson-module-kotlin": { "locked": "2.17.3", "transitive": [ - "com.fasterxml.jackson:jackson-bom" + "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", "org.springframework.boot:spring-boot-starter-json" ] }, @@ -2909,15 +2974,19 @@ "locked": "22.3", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test" ] }, "com.graphql-java:graphql-java-extended-scalars": { "locked": "22.0", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, @@ -2933,17 +3002,24 @@ "locked": "2.9.0", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.springframework.boot:spring-boot-starter-test" + "org.springframework.boot:spring-boot-starter-test", + "org.springframework.graphql:spring-graphql-test" ] }, "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-client": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -2957,58 +3033,56 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { "project": true, "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test": { "project": true, "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, @@ -3017,7 +3091,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -3040,7 +3114,10 @@ ] }, "io.mockk:mockk": { - "locked": "1.13.13" + "locked": "1.13.13", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "io.mockk:mockk-agent": { "locked": "1.13.13", @@ -3239,16 +3316,20 @@ "io.projectreactor:reactor-core": { "locked": "3.6.12", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", "io.projectreactor.netty:reactor-netty-core", "io.projectreactor.netty:reactor-netty-http", "io.projectreactor:reactor-test", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test", "org.springframework:spring-webflux" ] }, "io.projectreactor:reactor-test": { "locked": "3.6.12", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, @@ -3366,14 +3447,14 @@ "locked": "2.0.21", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk", "io.mockk:mockk-agent", @@ -3384,7 +3465,10 @@ ] }, "org.jetbrains:annotations": { - "locked": "26.0.1" + "locked": "26.0.1", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "org.junit.jupiter:junit-jupiter": { "locked": "5.10.5", @@ -3496,15 +3580,23 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test", "org.springframework.boot:spring-boot-starter-web", "org.springframework.boot:spring-boot-starter-webflux" ] }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, "org.springframework.boot:spring-boot-starter-json": { "locked": "3.3.6", "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-web", "org.springframework.boot:spring-boot-starter-webflux" ] @@ -3522,7 +3614,10 @@ ] }, "org.springframework.boot:spring-boot-starter-test": { - "locked": "3.3.6" + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "org.springframework.boot:spring-boot-starter-tomcat": { "locked": "3.3.6", @@ -3531,10 +3626,16 @@ ] }, "org.springframework.boot:spring-boot-starter-web": { - "locked": "3.3.6" + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "org.springframework.boot:spring-boot-starter-webflux": { - "locked": "3.3.6" + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "org.springframework.boot:spring-boot-test": { "locked": "3.3.6", @@ -3549,6 +3650,19 @@ "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.graphql:spring-graphql-test" + ] + }, + "org.springframework.graphql:spring-graphql-test": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ @@ -3570,6 +3684,8 @@ "locked": "6.1.15", "transitive": [ "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test", "org.springframework:spring-webmvc" ] }, @@ -3605,13 +3721,16 @@ "org.springframework:spring-test": { "locked": "6.1.15", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "org.springframework.boot:spring-boot-starter-test", - "org.springframework.boot:spring-boot-test" + "org.springframework.boot:spring-boot-test", + "org.springframework.graphql:spring-graphql-test" ] }, "org.springframework:spring-web": { "locked": "6.1.15", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-web", "org.springframework.boot:spring-boot-starter-webflux", @@ -3671,6 +3790,7 @@ "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", "com.fasterxml.jackson.module:jackson-module-kotlin", "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, @@ -3699,7 +3819,7 @@ "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson:jackson-bom", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse", + "com.netflix.graphql.dgs:graphql-dgs-client", "org.springframework.boot:spring-boot-starter-json" ] }, @@ -3708,8 +3828,8 @@ "transitive": [ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-starter-json" ] }, @@ -3718,18 +3838,16 @@ "transitive": [ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", "org.springframework.boot:spring-boot-starter-json" ] }, @@ -3769,15 +3887,19 @@ "com.apollographql.federation:federation-graphql-java-support", "com.graphql-java:graphql-java-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test" ] }, "com.graphql-java:graphql-java-extended-scalars": { "locked": "22.0", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, @@ -3793,23 +3915,25 @@ "locked": "2.9.0", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.springframework.boot:spring-boot-starter-test" + "org.springframework.boot:spring-boot-starter-test", + "org.springframework.graphql:spring-graphql-test" ] }, "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-client": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -3823,85 +3947,57 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { "project": true, "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test": { "project": true, "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, @@ -3910,7 +4006,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -3924,7 +4020,8 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.graphql:spring-graphql" ] }, "io.micrometer:micrometer-commons": { @@ -3941,7 +4038,10 @@ ] }, "io.mockk:mockk": { - "locked": "1.13.13" + "locked": "1.13.13", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "io.mockk:mockk-agent": { "locked": "1.13.13", @@ -4157,6 +4257,12 @@ "io.netty:netty-transport-native-epoll" ] }, + "io.projectreactor.kotlin:reactor-kotlin-extensions": { + "locked": "1.2.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-reactive" + ] + }, "io.projectreactor.netty:reactor-netty-core": { "locked": "1.1.24", "transitive": [ @@ -4172,19 +4278,22 @@ "io.projectreactor:reactor-core": { "locked": "3.6.12", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse", + "io.projectreactor.kotlin:reactor-kotlin-extensions", "io.projectreactor.netty:reactor-netty-core", "io.projectreactor.netty:reactor-netty-http", "io.projectreactor:reactor-test", "org.jetbrains.kotlinx:kotlinx-coroutines-reactor", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test", "org.springframework:spring-webflux" ] }, "io.projectreactor:reactor-test": { "locked": "3.6.12", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, @@ -4201,12 +4310,6 @@ "org.springframework.boot:spring-boot-starter-tomcat" ] }, - "jakarta.servlet:jakarta.servlet-api": { - "locked": "6.0.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" - ] - }, "jakarta.xml.bind:jakarta.xml.bind-api": { "locked": "4.0.2", "transitive": [ @@ -4253,12 +4356,6 @@ "org.springframework.boot:spring-boot-starter-test" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.logging.log4j:log4j-api": { "locked": "2.23.1", "transitive": [ @@ -4323,7 +4420,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -4334,17 +4430,14 @@ "locked": "2.0.21", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", "io.mockk:mockk-agent-jvm", @@ -4371,6 +4464,7 @@ "locked": "1.8.1", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-reactive", "io.mockk:mockk-dsl-jvm", "io.mockk:mockk-jvm", "org.jetbrains.kotlinx:kotlinx-coroutines-bom", @@ -4402,6 +4496,7 @@ "org.jetbrains:annotations": { "locked": "26.0.1", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "org.jetbrains.kotlin:kotlin-stdlib", "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm" ] @@ -4541,10 +4636,8 @@ "org.springframework.boot:spring-boot-autoconfigure": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "org.springframework.boot:spring-boot-starter", "org.springframework.boot:spring-boot-test-autoconfigure" ] @@ -4552,17 +4645,23 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test", "org.springframework.boot:spring-boot-starter-web", "org.springframework.boot:spring-boot-starter-webflux" ] }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, "org.springframework.boot:spring-boot-starter-json": { "locked": "3.3.6", "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-web", "org.springframework.boot:spring-boot-starter-webflux" ] @@ -4580,7 +4679,10 @@ ] }, "org.springframework.boot:spring-boot-starter-test": { - "locked": "3.3.6" + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "org.springframework.boot:spring-boot-starter-tomcat": { "locked": "3.3.6", @@ -4589,10 +4691,16 @@ ] }, "org.springframework.boot:spring-boot-starter-web": { - "locked": "3.3.6" + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "org.springframework.boot:spring-boot-starter-webflux": { - "locked": "3.3.6" + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client" + ] }, "org.springframework.boot:spring-boot-test": { "locked": "3.3.6", @@ -4604,9 +4712,24 @@ "org.springframework.boot:spring-boot-test-autoconfigure": { "locked": "3.3.6", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.graphql:spring-graphql-test" + ] + }, + "org.springframework.graphql:spring-graphql-test": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ @@ -4629,6 +4752,8 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test", "org.springframework:spring-webmvc", "org.springframework:spring-websocket" ] @@ -4666,21 +4791,18 @@ "org.springframework:spring-test": { "locked": "6.1.15", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "org.springframework.boot:spring-boot-starter-test", - "org.springframework.boot:spring-boot-test" + "org.springframework.boot:spring-boot-test", + "org.springframework.graphql:spring-graphql-test" ] }, "org.springframework:spring-web": { "locked": "6.1.15", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-web", "org.springframework.boot:spring-boot-starter-webflux", @@ -4698,20 +4820,13 @@ "org.springframework:spring-webmvc": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-sse-autoconfigure", "org.springframework.boot:spring-boot-starter-web" ] }, "org.springframework:spring-websocket": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, "org.xmlunit:xmlunit-core": { diff --git a/graphql-dgs-client/src/main/kotlin/com/netflix/graphql/dgs/client/DefaultGraphQLClient.kt b/graphql-dgs-client/src/main/kotlin/com/netflix/graphql/dgs/client/DefaultGraphQLClient.kt deleted file mode 100644 index 34f3a0ca3..000000000 --- a/graphql-dgs-client/src/main/kotlin/com/netflix/graphql/dgs/client/DefaultGraphQLClient.kt +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.client - -import org.intellij.lang.annotations.Language -import reactor.core.publisher.Mono - -/** - * Default [GraphQLClient] implementation. Use this class to execute GraphQL queries against a standalone DGS or the gateway. - * The value of this client is in it's JSON parsing of responses. - * The client is not tied to any particular HTTP client library. The actual HTTP request code is provided by the user. - * Note that if you want to use WebClient, there is the [WebClientGraphQLClient] available, which is simpler to use. - * - * Example: - * - * @Autowired - * RestTemplate restTemplate; - * - * DefaultGraphQLClient graphQLClient = new DefaultGraphQLClient("/graphql"); - * return graphQLClient.executeQuery(query, Collections.emptyMap(), (url, headers, body) -> { - * HttpHeaders httpHeaders = new HttpHeaders(); - * headers.forEach(httpHeaders::addAll); - * - * ResponseEntity exchange = restTemplate.exchange(url, HttpMethod.POST, new HttpEntity(body, httpHeaders), String.class); - * return new HttpResponse(exchange.getStatusCodeValue(), exchange.getBody()); - * }); - */ -@Deprecated("This has been replaced by [CustomGraphQLClient], [CustomReactiveGraphQLClient] and [WebClientGraphQLClient]") -class DefaultGraphQLClient( - private val url: String, -) : GraphQLClient, - MonoGraphQLClient { - /** - * Executes a query and returns a GraphQLResponse. - * The actual HTTP request is done by an implementation of RequestExecutor, which is user provided. - * The RequestExecutor is typically provided as a lambda expression. - * The `Accept` and `Content-Type` headers are set. Additional headers can be set in the RequestExecutor. - * @param query The Query as a String - * @param variables Query variables. May be empty - * @param operationName optional operation name - * @param requestExecutor The code that does the actual HTTP request. Typically provided as a lambda expression. - * @return GraphQLResponse - * @throws GraphQLClientException when the HTTP response code is not 2xx. - */ - @Deprecated( - "The RequestExecutor should be provided while creating the implementation. Use CustomGraphQLClient/CustomMonoGraphQLClient instead.", - ) - override fun executeQuery( - @Language("graphql") query: String, - variables: Map, - operationName: String?, - requestExecutor: RequestExecutor, - ): GraphQLResponse { - val serializedRequest = - GraphQLClients.objectMapper.writeValueAsString( - GraphQLClients.toRequestMap(query = query, operationName = operationName, variables = variables), - ) - val response = requestExecutor.execute(url, GraphQLClients.defaultHeaders, serializedRequest) - return GraphQLClients.handleResponse(response, serializedRequest, url) - } - - override fun executeQuery( - @Language("graphql") query: String, - ): GraphQLResponse = throw UnsupportedOperationException("Please move to [BlockingGraphQLClient] to use this method") - - override fun executeQuery( - @Language("graphql") query: String, - variables: Map, - ): GraphQLResponse = throw UnsupportedOperationException("Please move to [BlockingGraphQLClient] to use this method") - - override fun executeQuery( - @Language("graphql") query: String, - variables: Map, - operationName: String?, - ): GraphQLResponse = throw UnsupportedOperationException("Please move to [BlockingGraphQLClient] to use this method") - - /** - * Executes a query and returns a GraphQLResponse. - * The actual HTTP request is done by an implementation of RequestExecutor, which is user provided. - * The RequestExecutor is typically provided as a lambda expression. - * The `Accept` and `Content-Type` headers are set. Additional headers can be set in the RequestExecutor. - * @param query The Query as a String - * @param variables Query variables. May be empty - * @param requestExecutor The code that does the actual HTTP request. Typically provided as a lambda expression. - * @return GraphQLResponse - * @throws GraphQLClientException when the HTTP response code is not 2xx. - */ - @Deprecated( - "The RequestExecutor should be provided while creating the implementation. Use CustomGraphQLClient/CustomMonoGraphQLClient instead.", - ) - override fun executeQuery( - @Language("graphql") query: String, - variables: Map, - requestExecutor: RequestExecutor, - ): GraphQLResponse { - @Suppress("deprecation") - return executeQuery(query, variables, null, requestExecutor) - } - - override fun reactiveExecuteQuery( - @Language("graphql") query: String, - ): Mono = throw UnsupportedOperationException("Please move to [CustomGraphQLClient] to use this method") - - override fun reactiveExecuteQuery( - @Language("graphql") query: String, - variables: Map, - ): Mono = throw UnsupportedOperationException("Please move to [CustomGraphQLClient] to use this method") - - override fun reactiveExecuteQuery( - @Language("graphql") query: String, - variables: Map, - operationName: String?, - ): Mono = throw UnsupportedOperationException("Please move to [CustomGraphQLClient] to use this method") - - /** - * Executes a query and returns a reactive Mono. - * The actual HTTP request is done by an implementation of RequestExecutor, which is user provided. - * The RequestExecutor is typically provided as a lambda expression. - * The `Accept` and `Content-Type` headers are set. Additional headers can be set in the RequestExecutor. - * @param query The Query as a String - * @param variables Query variables. May be empty - * @param requestExecutor The code that does the actual HTTP request. Typically provided as a lambda expression. - * @return Mono - * @throws GraphQLClientException when the HTTP response code is not 2xx. - */ - @Deprecated( - "The RequestExecutor should be provided while creating the implementation. Use CustomGraphQLClient/CustomMonoGraphQLClient instead.", - ) - override fun reactiveExecuteQuery( - @Language("graphql") query: String, - variables: Map, - requestExecutor: MonoRequestExecutor, - ): Mono { - @Suppress("deprecation") - return reactiveExecuteQuery(query, variables, null, requestExecutor) - } - - /** - * Executes a query and returns a reactive Mono. - * The actual HTTP request is done by an implementation of RequestExecutor, which is user provided. - * The RequestExecutor is typically provided as a lambda expression. - * The `Accept` and `Content-Type` headers are set. Additional headers can be set in the RequestExecutor. - * @param query The Query as a String - * @param variables Query variables. May be empty - * @param operationName optional operation name - * @param requestExecutor The code that does the actual HTTP request. Typically provided as a lambda expression. - * @return Mono - * @throws GraphQLClientException when the HTTP response code is not 2xx. - */ - @Deprecated( - "The RequestExecutor should be provided while creating the implementation. Use CustomGraphQLClient/CustomMonoGraphQLClient instead.", - ) - override fun reactiveExecuteQuery( - @Language("graphql") query: String, - variables: Map, - operationName: String?, - requestExecutor: MonoRequestExecutor, - ): Mono { - val serializedRequest = - GraphQLClients.objectMapper.writeValueAsString( - GraphQLClients.toRequestMap(query = query, operationName = operationName, variables = variables), - ) - return requestExecutor.execute(url, GraphQLClients.defaultHeaders, serializedRequest).map { response -> - GraphQLClients.handleResponse(response, serializedRequest, url) - } - } -} diff --git a/graphql-dgs-client/src/main/kotlin/com/netflix/graphql/dgs/client/GraphqlSSESubscriptionGraphQLClient.kt b/graphql-dgs-client/src/main/kotlin/com/netflix/graphql/dgs/client/GraphqlSSESubscriptionGraphQLClient.kt index 418b812a7..cdf80b4c4 100644 --- a/graphql-dgs-client/src/main/kotlin/com/netflix/graphql/dgs/client/GraphqlSSESubscriptionGraphQLClient.kt +++ b/graphql-dgs-client/src/main/kotlin/com/netflix/graphql/dgs/client/GraphqlSSESubscriptionGraphQLClient.kt @@ -55,6 +55,7 @@ class GraphqlSSESubscriptionGraphQLClient( webClient .post() .uri(url) + .contentType(MediaType.APPLICATION_JSON) .bodyValue(jsonPayload) .accept(MediaType.TEXT_EVENT_STREAM) .retrieve() diff --git a/graphql-dgs-client/src/main/kotlin/com/netflix/graphql/dgs/client/SSESubscriptionGraphQLClient.kt b/graphql-dgs-client/src/main/kotlin/com/netflix/graphql/dgs/client/SSESubscriptionGraphQLClient.kt index f819c7399..11bb5c5ce 100644 --- a/graphql-dgs-client/src/main/kotlin/com/netflix/graphql/dgs/client/SSESubscriptionGraphQLClient.kt +++ b/graphql-dgs-client/src/main/kotlin/com/netflix/graphql/dgs/client/SSESubscriptionGraphQLClient.kt @@ -31,6 +31,11 @@ import java.util.* * This client can be used for servers which are following the subscriptions-transport-sse specification, which can be found here: * https://github.com/CodeCommission/subscriptions-transport-sse */ +@Deprecated( + "This client uses the obsolete subscriptions-transport-sse protocol. Use GraphqlSSESubscriptionGraphQLClient to use the newer graphql-sse spec https://github.com/graphql/graphql-over-http/blob/d51ae80d62b5fd8802a3383793f01bdf306e8290/rfcs/GraphQLOverSSE.md.", + ReplaceWith("GraphqlSSESubscriptionGraphQLClient"), + DeprecationLevel.WARNING, +) class SSESubscriptionGraphQLClient( private val url: String, private val webClient: WebClient, diff --git a/graphql-dgs-client/src/main/kotlin/com/netflix/graphql/dgs/client/WebSocketGraphQLClient.kt b/graphql-dgs-client/src/main/kotlin/com/netflix/graphql/dgs/client/WebSocketGraphQLClient.kt index 1a6ba2ce3..8d4e9b513 100644 --- a/graphql-dgs-client/src/main/kotlin/com/netflix/graphql/dgs/client/WebSocketGraphQLClient.kt +++ b/graphql-dgs-client/src/main/kotlin/com/netflix/graphql/dgs/client/WebSocketGraphQLClient.kt @@ -40,6 +40,10 @@ import java.util.concurrent.atomic.AtomicReference * Reactive client implementation using websockets and the subscription-transport-ws protocol: * https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md */ +@Deprecated( + "This client is using the deprecated subscription-transport-ws protocol, which is no longer supported by DGS servers. Use Spring GraphQL WebSocketGraphQlClient instead. https://docs.spring.io/spring-graphql/reference/client.html#client.websocketgraphqlclient", + level = DeprecationLevel.WARNING, +) class WebSocketGraphQLClient( private val client: OperationMessageWebSocketClient, private val acknowledgementTimeout: Duration = DEFAULT_ACKNOWLEDGEMENT_TIMEOUT, diff --git a/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/CustomGraphQLClientTest.kt b/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/CustomGraphQLClientTest.kt index 58fb6b8fb..206964031 100644 --- a/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/CustomGraphQLClientTest.kt +++ b/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/CustomGraphQLClientTest.kt @@ -19,9 +19,7 @@ package com.netflix.graphql.dgs.client import com.netflix.graphql.dgs.DgsComponent import com.netflix.graphql.dgs.DgsQuery import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import com.netflix.graphql.dgs.subscriptions.graphql.sse.DgsGraphQLSSEAutoConfig -import com.netflix.graphql.dgs.webmvc.autoconfigure.DgsWebMvcAutoConfiguration +import com.netflix.graphql.dgs.test.EnableDgsTest import graphql.language.FieldDefinition import graphql.language.ObjectTypeDefinition import graphql.language.TypeName @@ -29,7 +27,6 @@ import graphql.schema.idl.TypeDefinitionRegistry import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test -import org.springframework.boot.autoconfigure.EnableAutoConfiguration import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.test.context.SpringBootTest import org.springframework.boot.test.web.server.LocalServerPort @@ -39,10 +36,10 @@ import org.springframework.http.HttpMethod import org.springframework.web.client.RestTemplate @SpringBootTest( - classes = [DgsAutoConfiguration::class, DgsWebMvcAutoConfiguration::class, WebClientGraphQLClientTest.TestApp::class], + classes = [WebClientGraphQLClientTest.TestApp::class], webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, ) -@EnableAutoConfiguration(exclude = [DgsGraphQLSSEAutoConfig::class]) +@EnableDgsTest class CustomGraphQLClientTest { @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") @LocalServerPort diff --git a/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/CustomReactiveGraphQLClientTest.kt b/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/CustomReactiveGraphQLClientTest.kt index bd6aaad87..3277c6804 100644 --- a/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/CustomReactiveGraphQLClientTest.kt +++ b/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/CustomReactiveGraphQLClientTest.kt @@ -19,16 +19,13 @@ package com.netflix.graphql.dgs.client import com.netflix.graphql.dgs.DgsComponent import com.netflix.graphql.dgs.DgsQuery import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import com.netflix.graphql.dgs.subscriptions.graphql.sse.DgsGraphQLSSEAutoConfig -import com.netflix.graphql.dgs.webmvc.autoconfigure.DgsWebMvcAutoConfiguration +import com.netflix.graphql.dgs.test.EnableDgsTest import graphql.language.FieldDefinition import graphql.language.ObjectTypeDefinition import graphql.language.TypeName import graphql.schema.idl.TypeDefinitionRegistry import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test -import org.springframework.boot.autoconfigure.EnableAutoConfiguration import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.test.context.SpringBootTest import org.springframework.boot.test.web.server.LocalServerPort @@ -37,10 +34,10 @@ import org.springframework.web.reactive.function.client.toEntity import reactor.test.StepVerifier @SpringBootTest( - classes = [DgsAutoConfiguration::class, DgsWebMvcAutoConfiguration::class, WebClientGraphQLClientTest.TestApp::class], + classes = [WebClientGraphQLClientTest.TestApp::class], webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, ) -@EnableAutoConfiguration(exclude = [DgsGraphQLSSEAutoConfig::class]) +@EnableDgsTest class CustomReactiveGraphQLClientTest { @LocalServerPort var port: Int? = null diff --git a/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/GraphqlSSESubscriptionGraphQLClientTest.kt b/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/GraphqlSSESubscriptionGraphQLClientTest.kt index 3ffc347ad..67b32014d 100644 --- a/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/GraphqlSSESubscriptionGraphQLClientTest.kt +++ b/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/GraphqlSSESubscriptionGraphQLClientTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Netflix, Inc. + * Copyright 2021 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,33 +16,36 @@ package com.netflix.graphql.dgs.client -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import com.netflix.graphql.dgs.subscriptions.graphql.sse.DgsGraphQLSSEAutoConfig -import com.netflix.graphql.dgs.subscriptions.sse.DgsSSEAutoConfig -import com.netflix.graphql.dgs.subscriptions.websockets.DgsWebSocketAutoConfig +import com.netflix.graphql.dgs.DgsComponent +import com.netflix.graphql.dgs.DgsSubscription +import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry +import com.netflix.graphql.dgs.test.EnableDgsTest +import graphql.language.FieldDefinition.newFieldDefinition +import graphql.language.ObjectTypeDefinition.newObjectTypeDefinition +import graphql.language.TypeName +import graphql.schema.idl.TypeDefinitionRegistry import org.junit.jupiter.api.Assertions.assertThrows -import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test -import org.springframework.boot.autoconfigure.EnableAutoConfiguration +import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.test.context.SpringBootTest import org.springframework.boot.test.web.server.LocalServerPort import org.springframework.web.reactive.function.client.WebClient import org.springframework.web.reactive.function.client.WebClientResponseException +import reactor.core.publisher.Flux import reactor.test.StepVerifier @SpringBootTest( - classes = [DgsAutoConfiguration::class, DgsGraphQLSSEAutoConfig::class, TestApp::class], + classes = [TestApp::class], webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, ) -@EnableAutoConfiguration(exclude = [DgsSSEAutoConfig::class, DgsWebSocketAutoConfig::class]) -@Disabled("Suspecting this test class to be the root cause of hanging builds") +@EnableDgsTest internal class GraphqlSSESubscriptionGraphQLClientTest { @LocalServerPort var port: Int? = null @Test fun `A successful subscription should publish ticks`() { - val client = GraphqlSSESubscriptionGraphQLClient("/subscriptions", WebClient.create("http://localhost:$port")) + val client = GraphqlSSESubscriptionGraphQLClient("/graphql", WebClient.create("http://localhost:$port")) val reactiveExecuteQuery = client.reactiveExecuteQuery("subscription {numbers}", emptyMap()).mapNotNull { r -> r.data["numbers"] } @@ -55,7 +58,7 @@ internal class GraphqlSSESubscriptionGraphQLClientTest { @Test fun `An error on the subscription should send the error as a response and end the subscription`() { - val client = GraphqlSSESubscriptionGraphQLClient("/subscriptions", WebClient.create("http://localhost:$port")) + val client = GraphqlSSESubscriptionGraphQLClient("/graphql", WebClient.create("http://localhost:$port")) val reactiveExecuteQuery = client.reactiveExecuteQuery("subscription {withError}", emptyMap()) StepVerifier @@ -76,19 +79,58 @@ internal class GraphqlSSESubscriptionGraphQLClientTest { @Test fun `A badly formatted query should result in a WebClientException`() { - val client = GraphqlSSESubscriptionGraphQLClient("/subscriptions", WebClient.create("http://localhost:$port")) + val client = GraphqlSSESubscriptionGraphQLClient("/graphql", WebClient.create("http://localhost:$port")) - assertThrows(WebClientResponseException.BadRequest::class.java) { - client.reactiveExecuteQuery("invalid query", emptyMap()).blockLast() - } + val reactiveExecuteQuery = client.reactiveExecuteQuery("invalid query", emptyMap()) + StepVerifier + .create(reactiveExecuteQuery) + .consumeNextWith { r -> r.hasErrors() } + .expectComplete() + .verify() } @Test fun `An invalid query should result in a WebClientException`() { - val client = GraphqlSSESubscriptionGraphQLClient("/subscriptions", WebClient.create("http://localhost:$port")) + val client = GraphqlSSESubscriptionGraphQLClient("/graphql", WebClient.create("http://localhost:$port")) + + val reactiveExecuteQuery = client.reactiveExecuteQuery("subscriptions { unkownField }", emptyMap()) + StepVerifier + .create(reactiveExecuteQuery) + .consumeNextWith { r -> r.hasErrors() } + .expectComplete() + .verify() + } +} + +@SpringBootApplication +internal open class TestApp { + @DgsComponent + class SubscriptionDataFetcher { + @DgsSubscription + fun numbers(): Flux = Flux.just(1, 2, 3) + + @DgsSubscription + fun withError(): Flux = Flux.error(IllegalArgumentException("testing"), true) - assertThrows(WebClientResponseException.BadRequest::class.java) { - client.reactiveExecuteQuery("subscriptions { unkownField }", emptyMap()).blockLast() + @DgsTypeDefinitionRegistry + fun typeDefinitionRegistry(): TypeDefinitionRegistry { + val newRegistry = TypeDefinitionRegistry() + newRegistry.add( + newObjectTypeDefinition() + .name("Subscription") + .fieldDefinition( + newFieldDefinition() + .name("numbers") + .type(TypeName("Int")) + .build(), + ).fieldDefinition( + newFieldDefinition() + .name("withError") + .type(TypeName("Int")) + .build(), + ).build(), + ) + return newRegistry } } } diff --git a/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/RestClientGraphQLClientTest.kt b/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/RestClientGraphQLClientTest.kt index 1784fa262..b4980c240 100644 --- a/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/RestClientGraphQLClientTest.kt +++ b/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/RestClientGraphQLClientTest.kt @@ -23,9 +23,7 @@ import com.netflix.graphql.dgs.DgsQuery import com.netflix.graphql.dgs.DgsRuntimeWiring import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry import com.netflix.graphql.dgs.InputArgument -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import com.netflix.graphql.dgs.subscriptions.graphql.sse.DgsGraphQLSSEAutoConfig -import com.netflix.graphql.dgs.webmvc.autoconfigure.DgsWebMvcAutoConfiguration +import com.netflix.graphql.dgs.test.EnableDgsTest import graphql.GraphQLContext import graphql.scalars.ExtendedScalars import graphql.schema.Coercing @@ -39,7 +37,6 @@ import org.intellij.lang.annotations.Language import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.autoconfigure.EnableAutoConfiguration import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.test.context.SpringBootTest import org.springframework.boot.test.web.server.LocalServerPort @@ -50,17 +47,15 @@ import org.springframework.web.client.HttpClientErrorException import org.springframework.web.client.RestClient import java.time.LocalDateTime import java.time.format.DateTimeFormatter -import java.util.Locale +import java.util.* @SpringBootTest( classes = [ - DgsAutoConfiguration::class, - DgsWebMvcAutoConfiguration::class, RestClientGraphQLClientTest.TestApp::class, ], webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, ) -@EnableAutoConfiguration(exclude = [DgsGraphQLSSEAutoConfig::class]) +@EnableDgsTest class RestClientGraphQLClientTest { @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") @LocalServerPort diff --git a/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/SSESubscriptionGraphQLClientTest.kt b/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/SSESubscriptionGraphQLClientTest.kt deleted file mode 100644 index 89cccca6d..000000000 --- a/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/SSESubscriptionGraphQLClientTest.kt +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.client - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsSubscription -import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import com.netflix.graphql.dgs.subscriptions.graphql.sse.DgsGraphQLSSEAutoConfig -import com.netflix.graphql.dgs.subscriptions.sse.DgsSSEAutoConfig -import graphql.language.FieldDefinition.newFieldDefinition -import graphql.language.ObjectTypeDefinition.newObjectTypeDefinition -import graphql.language.TypeName -import graphql.schema.idl.TypeDefinitionRegistry -import org.junit.jupiter.api.Assertions.assertThrows -import org.junit.jupiter.api.Test -import org.springframework.boot.autoconfigure.EnableAutoConfiguration -import org.springframework.boot.autoconfigure.SpringBootApplication -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.boot.test.web.server.LocalServerPort -import org.springframework.web.reactive.function.client.WebClient -import org.springframework.web.reactive.function.client.WebClientResponseException -import reactor.core.publisher.Flux -import reactor.test.StepVerifier - -@SpringBootTest( - classes = [DgsAutoConfiguration::class, DgsSSEAutoConfig::class, TestApp::class], - webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, -) -@EnableAutoConfiguration(exclude = [DgsGraphQLSSEAutoConfig::class]) -internal class SSESubscriptionGraphQLClientTest { - @LocalServerPort - var port: Int? = null - - @Test - fun `A successful subscription should publish ticks`() { - val client = SSESubscriptionGraphQLClient("/subscriptions", WebClient.create("http://localhost:$port")) - val reactiveExecuteQuery = - client.reactiveExecuteQuery("subscription {numbers}", emptyMap()).mapNotNull { r -> r.data["numbers"] } - - StepVerifier - .create(reactiveExecuteQuery) - .expectNext(1, 2, 3) - .expectComplete() - .verify() - } - - @Test - fun `An error on the subscription should send the error as a response and end the subscription`() { - val client = SSESubscriptionGraphQLClient("/subscriptions", WebClient.create("http://localhost:$port")) - val reactiveExecuteQuery = client.reactiveExecuteQuery("subscription {withError}", emptyMap()) - - StepVerifier - .create(reactiveExecuteQuery) - .consumeNextWith { r -> r.hasErrors() } - .expectComplete() - .verify() - } - - @Test - fun `A connection error should result in a WebClientException`() { - val client = SSESubscriptionGraphQLClient("/wrongurl", WebClient.create("http://localhost:$port")) - - assertThrows(WebClientResponseException.NotFound::class.java) { - client.reactiveExecuteQuery("subscription {withError}", emptyMap()).blockLast() - } - } - - @Test - fun `A badly formatted query should result in a WebClientException`() { - val client = SSESubscriptionGraphQLClient("/subscriptions", WebClient.create("http://localhost:$port")) - - assertThrows(WebClientResponseException.BadRequest::class.java) { - client.reactiveExecuteQuery("invalid query", emptyMap()).blockLast() - } - } - - @Test - fun `An invalid query should result in a WebClientException`() { - val client = SSESubscriptionGraphQLClient("/subscriptions", WebClient.create("http://localhost:$port")) - - assertThrows(WebClientResponseException.BadRequest::class.java) { - client.reactiveExecuteQuery("subscriptions { unkownField }", emptyMap()).blockLast() - } - } -} - -@SpringBootApplication -internal open class TestApp { - @DgsComponent - class SubscriptionDataFetcher { - @DgsSubscription - fun numbers(): Flux = Flux.just(1, 2, 3) - - @DgsSubscription - fun withError(): Flux = Flux.error(IllegalArgumentException("testing"), true) - - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry { - val newRegistry = TypeDefinitionRegistry() - newRegistry.add( - newObjectTypeDefinition() - .name("Subscription") - .fieldDefinition( - newFieldDefinition() - .name("numbers") - .type(TypeName("Int")) - .build(), - ).fieldDefinition( - newFieldDefinition() - .name("withError") - .type(TypeName("Int")) - .build(), - ).build(), - ) - return newRegistry - } - } -} diff --git a/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/WebClientGraphQLClientTest.kt b/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/WebClientGraphQLClientTest.kt index 1546b403a..e3fcc5c91 100644 --- a/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/WebClientGraphQLClientTest.kt +++ b/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/WebClientGraphQLClientTest.kt @@ -23,9 +23,7 @@ import com.netflix.graphql.dgs.DgsQuery import com.netflix.graphql.dgs.DgsRuntimeWiring import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry import com.netflix.graphql.dgs.InputArgument -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import com.netflix.graphql.dgs.subscriptions.graphql.sse.DgsGraphQLSSEAutoConfig -import com.netflix.graphql.dgs.webmvc.autoconfigure.DgsWebMvcAutoConfiguration +import com.netflix.graphql.dgs.test.EnableDgsTest import graphql.GraphQLContext import graphql.scalars.ExtendedScalars import graphql.schema.Coercing @@ -38,7 +36,6 @@ import org.assertj.core.api.Assertions.assertThat import org.intellij.lang.annotations.Language import org.junit.jupiter.api.Test import org.junit.jupiter.api.fail -import org.springframework.boot.autoconfigure.EnableAutoConfiguration import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.test.context.SpringBootTest import org.springframework.boot.test.web.server.LocalServerPort @@ -57,13 +54,11 @@ import java.util.* @Suppress("GraphQLUnresolvedReference") @SpringBootTest( classes = [ - DgsAutoConfiguration::class, - DgsWebMvcAutoConfiguration::class, WebClientGraphQLClientTest.TestApp::class, ], webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, ) -@EnableAutoConfiguration(exclude = [DgsGraphQLSSEAutoConfig::class]) +@EnableDgsTest class WebClientGraphQLClientTest { @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") @LocalServerPort diff --git a/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/WebSocketGraphQLClientWithDGSServerTest.kt b/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/WebSocketGraphQLClientWithDGSServerTest.kt deleted file mode 100644 index 56a547a53..000000000 --- a/graphql-dgs-client/src/test/kotlin/com/netflix/graphql/dgs/client/WebSocketGraphQLClientWithDGSServerTest.kt +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.client - -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import com.netflix.graphql.dgs.subscriptions.graphql.sse.DgsGraphQLSSEAutoConfig -import com.netflix.graphql.dgs.subscriptions.sse.DgsSSEAutoConfig -import com.netflix.graphql.dgs.subscriptions.websockets.DgsWebSocketAutoConfig -import graphql.GraphQLException -import org.junit.jupiter.api.Assertions -import org.junit.jupiter.api.BeforeEach -import org.junit.jupiter.api.Test -import org.slf4j.LoggerFactory -import org.springframework.boot.autoconfigure.EnableAutoConfiguration -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.boot.test.web.server.LocalServerPort -import org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient -import reactor.test.StepVerifier - -@SpringBootTest( - classes = [DgsWebSocketAutoConfig::class, TestApp::class], - webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, -) -@EnableAutoConfiguration(exclude = [DgsSSEAutoConfig::class, DgsGraphQLSSEAutoConfig::class]) -internal class WebSocketGraphQLClientWithDGSServerTest { - private val logger = LoggerFactory.getLogger(WebSocketGraphQLClientWithDGSServerTest::class.java) - - @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") - @LocalServerPort - lateinit var port: Integer - - lateinit var client: WebSocketGraphQLClient - - @BeforeEach - fun setup() { - client = WebSocketGraphQLClient("ws://localhost:$port/subscriptions", ReactorNettyWebSocketClient()) - } - - @Test - fun `A successful subscription should publish ticks`() { - val reactiveExecuteQuery = - client.reactiveExecuteQuery("subscription s {numbers}", emptyMap()).mapNotNull { r -> r.data["numbers"] } - - StepVerifier - .create(reactiveExecuteQuery) - .expectNext(1, 2, 3) - .expectComplete() - .verify() - } - - @Test - fun `A connection error should result in a WebClientException`() { - Assertions.assertThrows(GraphQLException::class.java) { - client.reactiveExecuteQuery("subscription {withError}", emptyMap()).blockLast() - } - } - - @Test - fun `A badly formatted query should result in a GraphQLException`() { - Assertions.assertThrows(GraphQLException::class.java) { - client.reactiveExecuteQuery("invalid query", emptyMap()).blockLast() - } - } - - @Test - fun `An invalid query should result in a UnknownOperationException`() { - Assertions.assertThrows(GraphQLException::class.java) { - client.reactiveExecuteQuery("subscriptions { unkownField }", emptyMap()).blockLast() - } - } -} diff --git a/graphql-dgs-example-java-webflux/README.md b/graphql-dgs-example-java-webflux/README.md deleted file mode 100644 index 006b08245..000000000 --- a/graphql-dgs-example-java-webflux/README.md +++ /dev/null @@ -1,8 +0,0 @@ -This example app demonstrates some DGS framework features. -It also includes a very simple React UI that uses Apollo Client that connects to both the /graphql and /subscriptions endpoints. -Start the app by running the `ExampleApp` class (e.g. from an IDE). - -* Graphiql will be available on: http://localhost:8080/graphiql -* The example UI will be available on: http://localhost:8080/index.html - -The example project includes a number of tests as well. \ No newline at end of file diff --git a/graphql-dgs-example-java-webflux/build.gradle.kts b/graphql-dgs-example-java-webflux/build.gradle.kts deleted file mode 100644 index 1c463ec00..000000000 --- a/graphql-dgs-example-java-webflux/build.gradle.kts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -dependencies { - implementation(project(":graphql-dgs-example-shared")) - implementation(project(":graphql-dgs-pagination")) - implementation(project(":graphql-dgs-webflux-starter")) - implementation(project(":graphql-dgs-extended-scalars")) - implementation("org.springframework.boot:spring-boot-starter-webflux") - implementation("io.projectreactor:reactor-core") -} diff --git a/graphql-dgs-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/ReactiveExampleApp.java b/graphql-dgs-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/ReactiveExampleApp.java deleted file mode 100644 index e7c8f8074..000000000 --- a/graphql-dgs-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/ReactiveExampleApp.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.example; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication(scanBasePackages = {"com.netflix.graphql.dgs.example.shared", "com.netflix.graphql.dgs.example"}) -public class ReactiveExampleApp { - public static void main(String[] args) { - SpringApplication.run(ReactiveExampleApp.class, args); - } -} diff --git a/graphql-dgs-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/context/MyContextBuilder.java b/graphql-dgs-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/context/MyContextBuilder.java deleted file mode 100644 index 6e2ea8bd7..000000000 --- a/graphql-dgs-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/context/MyContextBuilder.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.example.context; - -import com.netflix.graphql.dgs.example.shared.context.MyContext; -import com.netflix.graphql.dgs.reactive.DgsReactiveCustomContextBuilderWithRequest; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import org.springframework.http.HttpHeaders; -import org.springframework.stereotype.Component; -import org.springframework.web.reactive.function.server.ServerRequest; -import reactor.core.publisher.Mono; - -import java.util.Map; - -@Component -public class MyContextBuilder implements DgsReactiveCustomContextBuilderWithRequest { - @NotNull - @Override - public Mono build(@Nullable Map extensions, @Nullable HttpHeaders headers, @Nullable ServerRequest serverRequest) { - return Mono.just(new MyContext()); - } -} diff --git a/graphql-dgs-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/reactive/datafetchers/ReactiveDataFetchers.java b/graphql-dgs-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/reactive/datafetchers/ReactiveDataFetchers.java deleted file mode 100644 index 90cbcd02b..000000000 --- a/graphql-dgs-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/reactive/datafetchers/ReactiveDataFetchers.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.example.reactive.datafetchers; - -import com.netflix.graphql.dgs.DgsComponent; -import com.netflix.graphql.dgs.DgsQuery; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -@DgsComponent -public class ReactiveDataFetchers { - @DgsQuery - public Mono mono() { - return Mono.just("hello mono"); - } - - @DgsQuery - public Flux flux() { - return Flux.just(1, 2, 3); - } -} diff --git a/graphql-dgs-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/reactive/datafetchers/UsingWebFluxReactorContext.java b/graphql-dgs-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/reactive/datafetchers/UsingWebFluxReactorContext.java deleted file mode 100644 index 9e66a62d5..000000000 --- a/graphql-dgs-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/reactive/datafetchers/UsingWebFluxReactorContext.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.example.reactive.datafetchers; - -import com.netflix.graphql.dgs.DgsComponent; -import com.netflix.graphql.dgs.DgsQuery; -import reactor.core.publisher.Mono; - -@DgsComponent -public class UsingWebFluxReactorContext { - @DgsQuery - public Mono usingContext() { - return Mono.deferContextual(context -> Mono.just("Query with request ID: " + context.get("RequestId"))); - } -} diff --git a/graphql-dgs-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/reactive/datafetchers/WithCookie.java b/graphql-dgs-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/reactive/datafetchers/WithCookie.java deleted file mode 100644 index 5f6d956fc..000000000 --- a/graphql-dgs-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/reactive/datafetchers/WithCookie.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.example.reactive.datafetchers; - -import com.netflix.graphql.dgs.*; -import com.netflix.graphql.dgs.reactive.internal.DgsReactiveRequestData; -import org.springframework.http.ResponseCookie; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.reactive.function.server.ServerRequest; - -@DgsComponent -public class WithCookie { - - @DgsQuery - public String withCookie(@CookieValue String mydgscookie) { - return mydgscookie; - } - - @DgsMutation - public String updateCookie(@InputArgument String value, DgsDataFetchingEnvironment dfe) { - DgsReactiveRequestData requestData = (DgsReactiveRequestData) dfe.getDgsContext().getRequestData(); - ServerRequest serverRequest = requestData.getServerRequest(); - - serverRequest.exchange().getResponse() - .addCookie(ResponseCookie.from("mydgscookie", "webfluxupdated").build()); - return value; - } -} diff --git a/graphql-dgs-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/web/RequestIdWebFilter.java b/graphql-dgs-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/web/RequestIdWebFilter.java deleted file mode 100644 index 1ecc7119c..000000000 --- a/graphql-dgs-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/web/RequestIdWebFilter.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.example.web; - -import org.springframework.stereotype.Component; -import org.springframework.web.server.ServerWebExchange; -import org.springframework.web.server.WebFilter; -import org.springframework.web.server.WebFilterChain; -import reactor.core.publisher.Mono; -import reactor.util.context.Context; - -@Component -public class RequestIdWebFilter implements WebFilter { - @Override - public Mono filter(ServerWebExchange exchange, WebFilterChain chain) { - return chain.filter(exchange).contextWrite(Context.of("RequestId", exchange.getRequest().getId())); - } -} diff --git a/graphql-dgs-example-java-webflux/src/main/resources/application.yml b/graphql-dgs-example-java-webflux/src/main/resources/application.yml deleted file mode 100644 index 425cf296b..000000000 --- a/graphql-dgs-example-java-webflux/src/main/resources/application.yml +++ /dev/null @@ -1,7 +0,0 @@ -spring: - application: - name: dgs-example - -debug: true - - diff --git a/graphql-dgs-example-java-webflux/src/main/resources/schema/extraschema.graphqls b/graphql-dgs-example-java-webflux/src/main/resources/schema/extraschema.graphqls deleted file mode 100644 index 196f422a9..000000000 --- a/graphql-dgs-example-java-webflux/src/main/resources/schema/extraschema.graphqls +++ /dev/null @@ -1,5 +0,0 @@ -extend type Query { - mono: String - flux: [Int] - usingContext: String -} \ No newline at end of file diff --git a/graphql-dgs-example-java-webflux/src/test/java/ReactiveGraphQLContextContributorTest.java b/graphql-dgs-example-java-webflux/src/test/java/ReactiveGraphQLContextContributorTest.java deleted file mode 100644 index 816fa3221..000000000 --- a/graphql-dgs-example-java-webflux/src/test/java/ReactiveGraphQLContextContributorTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration; -import com.netflix.graphql.dgs.autoconfig.DgsExtendedScalarsAutoConfiguration; -import com.netflix.graphql.dgs.example.shared.context.ExampleGraphQLContextContributor; -import com.netflix.graphql.dgs.example.shared.datafetcher.MovieDataFetcher; -import com.netflix.graphql.dgs.example.shared.instrumentation.ExampleInstrumentationDependingOnContextContributor; -import com.netflix.graphql.dgs.pagination.DgsPaginationAutoConfiguration; -import com.netflix.graphql.dgs.reactive.DgsReactiveQueryExecutor; -import com.netflix.graphql.dgs.webflux.autoconfiguration.DgsWebFluxAutoConfiguration; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.mock.web.reactive.function.server.MockServerRequest; -import org.springframework.web.reactive.config.WebFluxConfigurationSupport; -import reactor.core.publisher.Mono; - - -import static com.netflix.graphql.dgs.example.shared.context.ExampleGraphQLContextContributor.CONTEXT_CONTRIBUTOR_HEADER_NAME; -import static com.netflix.graphql.dgs.example.shared.context.ExampleGraphQLContextContributor.CONTEXT_CONTRIBUTOR_HEADER_VALUE; -import static org.assertj.core.api.Assertions.assertThat; - -@SpringBootTest(classes = {WebFluxConfigurationSupport.class, DgsAutoConfiguration.class, MovieDataFetcher.class, ExampleGraphQLContextContributor.class, ExampleInstrumentationDependingOnContextContributor.class, DgsWebFluxAutoConfiguration.class, DgsPaginationAutoConfiguration.class, DgsExtendedScalarsAutoConfiguration.class}) -public class ReactiveGraphQLContextContributorTest { - - @Autowired - DgsReactiveQueryExecutor queryExecutor; - - @Test - void moviesExtensionShouldHaveContributedEnabledExtensionServerRequestSpecified() { - final MockServerRequest.Builder builder = MockServerRequest.builder(); - builder.header(CONTEXT_CONTRIBUTOR_HEADER_NAME, CONTEXT_CONTRIBUTOR_HEADER_VALUE); - - Mono contributorEnabled = queryExecutor.executeAndExtractJsonPath( - "{ movies { director } }", - "extensions.contributorEnabled", - builder.build()); - assertThat(contributorEnabled.block()).isEqualTo("true"); - } -} \ No newline at end of file diff --git a/graphql-dgs-example-java/README.md b/graphql-dgs-example-java/README.md deleted file mode 100644 index 006b08245..000000000 --- a/graphql-dgs-example-java/README.md +++ /dev/null @@ -1,8 +0,0 @@ -This example app demonstrates some DGS framework features. -It also includes a very simple React UI that uses Apollo Client that connects to both the /graphql and /subscriptions endpoints. -Start the app by running the `ExampleApp` class (e.g. from an IDE). - -* Graphiql will be available on: http://localhost:8080/graphiql -* The example UI will be available on: http://localhost:8080/index.html - -The example project includes a number of tests as well. \ No newline at end of file diff --git a/graphql-dgs-example-java/build.gradle.kts b/graphql-dgs-example-java/build.gradle.kts deleted file mode 100644 index 8ee6eba7d..000000000 --- a/graphql-dgs-example-java/build.gradle.kts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -dependencies { - implementation(project(":graphql-dgs-example-shared")) - implementation(project(":graphql-dgs-spring-boot-starter")) - implementation(project(":graphql-dgs-pagination")) - implementation(project(":graphql-dgs-extended-scalars")) - implementation(project(":graphql-dgs-subscriptions-websockets-autoconfigure")) - implementation("org.springframework.boot:spring-boot-starter-web") - implementation("io.projectreactor:reactor-core") - // Enabling Spring Boot Actuators. We are not expressing any opinion on which Metric System should be used - // please review the Spring Boot Docs in the link below for additional information. - // https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-features.html#production-ready-metrics-export-simple - implementation("org.springframework.boot:spring-boot-starter-actuator") - - // Adding the DGS Micrometer integration that provides timers for gql.* - // For additional information go to the link below: - // https://netflix.github.io/dgs/advanced/instrumentation/ - implementation(project(":graphql-dgs-spring-boot-micrometer")) - - implementation("com.github.ben-manes.caffeine:caffeine") - testImplementation(project(":graphql-dgs-client")) - testImplementation("org.springframework.boot:spring-boot-starter-webflux") - testImplementation("io.projectreactor:reactor-test") - testImplementation(project(mapOf("path" to ":graphql-dgs-example-shared"))) -} diff --git a/graphql-dgs-example-java/src/main/java/com/netflix/graphql/dgs/example/ExampleApp.java b/graphql-dgs-example-java/src/main/java/com/netflix/graphql/dgs/example/ExampleApp.java deleted file mode 100644 index 042156c6e..000000000 --- a/graphql-dgs-example-java/src/main/java/com/netflix/graphql/dgs/example/ExampleApp.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.example; - -import com.github.benmanes.caffeine.cache.Cache; -import com.github.benmanes.caffeine.cache.Caffeine; -import graphql.execution.preparsed.PreparsedDocumentEntry; -import graphql.execution.preparsed.PreparsedDocumentProvider; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.TimeUnit; -import java.util.function.Function; - -@SpringBootApplication(scanBasePackages = {"com.netflix.graphql.dgs.example.shared", "com.netflix.graphql.dgs.example"}) -public class ExampleApp { - public static void main(String[] args) { - SpringApplication.run(ExampleApp.class, args); - } - - @Configuration - static class PreparsedDocumentProviderConfig { - - private final Cache cache = Caffeine.newBuilder().maximumSize(250) - .expireAfterAccess(5,TimeUnit.MINUTES).recordStats().build(); - - - @Bean - public PreparsedDocumentProvider preparsedDocumentProvider() { - return (executionInput, parseAndValidateFunction) -> { - Function mapCompute = key -> parseAndValidateFunction.apply(executionInput); - return CompletableFuture.completedFuture(cache.get(executionInput.getQuery(), mapCompute)); - }; - } - } -} - diff --git a/graphql-dgs-example-java/src/main/java/com/netflix/graphql/dgs/example/context/MyContextBuilder.java b/graphql-dgs-example-java/src/main/java/com/netflix/graphql/dgs/example/context/MyContextBuilder.java deleted file mode 100644 index 6079c62f7..000000000 --- a/graphql-dgs-example-java/src/main/java/com/netflix/graphql/dgs/example/context/MyContextBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.example.context; - -import com.netflix.graphql.dgs.context.DgsCustomContextBuilder; -import com.netflix.graphql.dgs.example.shared.context.MyContext; -import org.springframework.stereotype.Component; - -@Component -public class MyContextBuilder implements DgsCustomContextBuilder { - @Override - public MyContext build() { - return new MyContext(); - } -} diff --git a/graphql-dgs-example-java/src/main/java/com/netflix/graphql/dgs/example/datafetcher/FileUploadMutation.java b/graphql-dgs-example-java/src/main/java/com/netflix/graphql/dgs/example/datafetcher/FileUploadMutation.java deleted file mode 100644 index 957e15cfd..000000000 --- a/graphql-dgs-example-java/src/main/java/com/netflix/graphql/dgs/example/datafetcher/FileUploadMutation.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.example.datafetcher; - -import com.netflix.graphql.dgs.DgsComponent; -import com.netflix.graphql.dgs.DgsData; -import com.netflix.graphql.dgs.InputArgument; -import graphql.schema.DataFetchingEnvironment; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.web.multipart.MultipartFile; - -import java.io.IOException; -import java.util.List; - -@DgsComponent -public class FileUploadMutation { - private static final Logger log = LoggerFactory.getLogger(FileUploadMutation.class); - - /** - * Implementation of the _Data Fetcher_ that will handle file upload. - * - * To test file upload via the command line you will first have to create a file, - * let's say we name it {@code a.txt} and contains only {@code Hello World!}. - * After that, you can use the {@code curl} command to execute the filue upload of one file as follows: - * {@code - *
-     *  curl -a http://localhost:8080/graphql \
-     *      --header "graphql-require-preflight:true" \
-     *      -F operations='{ "query" : "mutation ($file: Upload!) { uploadFile(input: { files:[$file]} ) }", "variables": {"file": null } }' \
-     *      -F map='{ "0": ["variables.file"] }' \
-     *      -F 0=@a.txt
-     * 
- * } - * - * @param input the GraphQL input argument of type FileUploadInput, serialized to the java pojo FileUploadInput. - * @param dfe the Data Fetching Environment - * @return boolean that will be true if all files are uploaded. - */ - @DgsData(parentType = "Mutation", field = "uploadFile") - public boolean uploadFile(@InputArgument FileUploadInput input, DataFetchingEnvironment dfe) { - List parts = input.getFiles(); - for (int i = 0; i < parts.size(); i++) { - try { - String content = new String(parts.get(i).getBytes()); - log.debug("File upload contents are\n{}\n", content); - } catch (IOException e) { - log.error("Failed to upload file[{}]!", i, e); - e.printStackTrace(); - } - } - return !parts.isEmpty(); - } - - @DgsData(parentType = "Mutation", field = "uploadTest") - public boolean uploadTest(@InputArgument MultipartFile input, DataFetchingEnvironment dfe) { - MultipartFile file = input; - if (file == null || file.isEmpty()) return false; - return true; - } - - static class FileUploadInput { - private String description; - private List files; - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public List getFiles() { - return files; - } - - public void setFiles(List file) { - this.files = file; - } - } -} - diff --git a/graphql-dgs-example-java/src/main/java/com/netflix/graphql/dgs/example/datafetcher/MyInstrumentation.java b/graphql-dgs-example-java/src/main/java/com/netflix/graphql/dgs/example/datafetcher/MyInstrumentation.java deleted file mode 100644 index d63a5d8c4..000000000 --- a/graphql-dgs-example-java/src/main/java/com/netflix/graphql/dgs/example/datafetcher/MyInstrumentation.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.example.datafetcher; - -import com.netflix.graphql.dgs.DgsExecutionResult; -import graphql.ExecutionResult; -import graphql.execution.instrumentation.InstrumentationState; -import graphql.execution.instrumentation.SimplePerformantInstrumentation; -import graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters; -import org.jetbrains.annotations.NotNull; -import org.springframework.http.HttpHeaders; -import org.springframework.stereotype.Component; - -import java.util.concurrent.CompletableFuture; - -@Component -public class MyInstrumentation extends SimplePerformantInstrumentation { - @NotNull - @Override - public CompletableFuture instrumentExecutionResult(ExecutionResult executionResult, - InstrumentationExecutionParameters parameters, - InstrumentationState state) { - HttpHeaders responseHeaders = new HttpHeaders(); - responseHeaders.add("myHeader", "hello"); - - return super.instrumentExecutionResult( - DgsExecutionResult.builder().executionResult(executionResult).headers(responseHeaders).build(), - parameters, - state - ); - } -} diff --git a/graphql-dgs-example-java/src/main/java/com/netflix/graphql/dgs/example/datafetcher/WithCookie.java b/graphql-dgs-example-java/src/main/java/com/netflix/graphql/dgs/example/datafetcher/WithCookie.java deleted file mode 100644 index a459f119d..000000000 --- a/graphql-dgs-example-java/src/main/java/com/netflix/graphql/dgs/example/datafetcher/WithCookie.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.example.datafetcher; - -import com.netflix.graphql.dgs.*; -import com.netflix.graphql.dgs.internal.DgsWebMvcRequestData; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.context.request.ServletWebRequest; - -@DgsComponent -public class WithCookie { - - @DgsQuery - public String withCookie(@CookieValue String mydgscookie) { - return mydgscookie; - } - - @DgsMutation - public String updateCookie(@InputArgument String value, DgsDataFetchingEnvironment dfe) { - DgsWebMvcRequestData requestData = (DgsWebMvcRequestData) dfe.getDgsContext().getRequestData(); - ServletWebRequest webRequest = (ServletWebRequest) requestData.getWebRequest(); - jakarta.servlet.http.Cookie cookie = new jakarta.servlet.http.Cookie("mydgscookie", value); - webRequest.getResponse().addCookie(cookie); - - return value; - } -} diff --git a/graphql-dgs-example-java/src/main/java/com/netflix/graphql/dgs/example/datafetcher/WithHeader.java b/graphql-dgs-example-java/src/main/java/com/netflix/graphql/dgs/example/datafetcher/WithHeader.java deleted file mode 100644 index 993028b4c..000000000 --- a/graphql-dgs-example-java/src/main/java/com/netflix/graphql/dgs/example/datafetcher/WithHeader.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.example.datafetcher; - -import com.netflix.graphql.dgs.DgsComponent; -import com.netflix.graphql.dgs.DgsQuery; -import com.netflix.graphql.dgs.InputArgument; -import org.springframework.http.HttpHeaders; -import org.springframework.web.bind.annotation.RequestHeader; - -@DgsComponent -public class WithHeader { - @DgsQuery(trivial = true) - public String helloWithHeaders(@InputArgument String name, @RequestHeader(HttpHeaders.AUTHORIZATION) String authorization) { - return "hello, " + authorization + "!"; - } -} diff --git a/graphql-dgs-example-java/src/main/resources/application.yml b/graphql-dgs-example-java/src/main/resources/application.yml deleted file mode 100644 index 15afb847c..000000000 --- a/graphql-dgs-example-java/src/main/resources/application.yml +++ /dev/null @@ -1,19 +0,0 @@ -spring: - application: - name: dgs-example - -management: - endpoints: - web: - exposure: - include: - - metrics - -logging: - level: - com.netflix.graphql.dgs.example: DEBUG - -dgs: - graphql: - prevent-mutation-over-get: - enabled: true \ No newline at end of file diff --git a/graphql-dgs-example-java/src/test/java/FileUploadMutationTest.java b/graphql-dgs-example-java/src/test/java/FileUploadMutationTest.java deleted file mode 100644 index 3b7c64559..000000000 --- a/graphql-dgs-example-java/src/test/java/FileUploadMutationTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import com.netflix.graphql.dgs.DgsQueryExecutor; -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration; -import com.netflix.graphql.dgs.autoconfig.DgsExtendedScalarsAutoConfiguration; -import com.netflix.graphql.dgs.example.datafetcher.FileUploadMutation; -import com.netflix.graphql.dgs.example.datafetcher.HelloDataFetcher; -import com.netflix.graphql.dgs.example.shared.datafetcher.ConcurrentDataFetcher; -import com.netflix.graphql.dgs.example.shared.datafetcher.MovieDataFetcher; -import com.netflix.graphql.dgs.example.shared.datafetcher.RatingMutation; -import com.netflix.graphql.dgs.pagination.DgsPaginationAutoConfiguration; -import org.assertj.core.util.Lists; -import org.assertj.core.util.Maps; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.http.MediaType; -import org.springframework.mock.web.MockMultipartFile; -import org.springframework.web.multipart.MultipartFile; - -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; - - -@SpringBootTest(classes = {HelloDataFetcher.class, MovieDataFetcher.class, ConcurrentDataFetcher.class, RatingMutation.class, DgsExtendedScalarsAutoConfiguration.class, DgsAutoConfiguration.class, DgsPaginationAutoConfiguration.class, FileUploadMutation.class}) -public class FileUploadMutationTest { - - @Autowired - DgsQueryExecutor queryExecutor; - - @Test - void fileUpload() { - MultipartFile file = new MockMultipartFile("hello", "hello.txt", MediaType.TEXT_PLAIN_VALUE, "Hello World".getBytes()); - - Map inputMap = Maps.newHashMap("description", "test"); - inputMap.put("files", Lists.newArrayList(file)); - - boolean result = queryExecutor.executeAndExtractJsonPath("mutation($input: FileUploadInput!) {uploadFile(input: $input)}", - "data.uploadFile", Maps.newHashMap("input", inputMap)); - assertThat(result).isTrue(); - } -} diff --git a/graphql-dgs-example-java/src/test/java/GraphQLContextContributorTest.java b/graphql-dgs-example-java/src/test/java/GraphQLContextContributorTest.java deleted file mode 100644 index 7e84c17a0..000000000 --- a/graphql-dgs-example-java/src/test/java/GraphQLContextContributorTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import com.netflix.graphql.dgs.DgsQueryExecutor; -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration; -import com.netflix.graphql.dgs.autoconfig.DgsExtendedScalarsAutoConfiguration; -import com.netflix.graphql.dgs.example.context.MyContextBuilder; -import com.netflix.graphql.dgs.example.datafetcher.HelloDataFetcher; -import com.netflix.graphql.dgs.example.shared.context.ExampleGraphQLContextContributor; -import com.netflix.graphql.dgs.example.shared.dataLoader.ExampleLoaderWithContext; -import com.netflix.graphql.dgs.example.shared.dataLoader.ExampleLoaderWithGraphQLContext; -import com.netflix.graphql.dgs.example.shared.instrumentation.ExampleInstrumentationDependingOnContextContributor; -import com.netflix.graphql.dgs.example.shared.datafetcher.MovieDataFetcher; -import com.netflix.graphql.dgs.pagination.DgsPaginationAutoConfiguration; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.mock.web.MockHttpServletRequest; -import org.springframework.web.context.request.ServletWebRequest; - -import static com.netflix.graphql.dgs.example.shared.context.ExampleGraphQLContextContributor.CONTEXT_CONTRIBUTOR_HEADER_NAME; -import static com.netflix.graphql.dgs.example.shared.context.ExampleGraphQLContextContributor.CONTEXT_CONTRIBUTOR_HEADER_VALUE; -import static org.assertj.core.api.Assertions.assertThat; - -@SpringBootTest(classes = {HelloDataFetcher.class, MovieDataFetcher.class, MyContextBuilder.class, ExampleGraphQLContextContributor.class, ExampleInstrumentationDependingOnContextContributor.class, DgsExtendedScalarsAutoConfiguration.class, DgsAutoConfiguration.class, DgsPaginationAutoConfiguration.class, ExampleLoaderWithContext.class, ExampleLoaderWithGraphQLContext.class}) -public class GraphQLContextContributorTest { - - @Autowired - DgsQueryExecutor queryExecutor; - - @Test - void moviesExtensionShouldHaveContributedEnabledExtension() { - final MockHttpServletRequest mockServletRequest = new MockHttpServletRequest(); - mockServletRequest.addHeader(CONTEXT_CONTRIBUTOR_HEADER_NAME, CONTEXT_CONTRIBUTOR_HEADER_VALUE); - ServletWebRequest servletWebRequest = new ServletWebRequest(mockServletRequest); - String contributorEnabled = queryExecutor.executeAndExtractJsonPath("{ movies { director } }", "extensions.contributorEnabled", servletWebRequest); - assertThat(contributorEnabled).isEqualTo("true"); - } - - @Test - void withDataloaderContext() { - String message = queryExecutor.executeAndExtractJsonPath("{withDataLoaderContext}", "data.withDataLoaderContext"); - assertThat(message).isEqualTo("Custom state! A"); - } - - @Test - void withDataloaderGraphQLContext() { - final MockHttpServletRequest mockServletRequest = new MockHttpServletRequest(); - mockServletRequest.addHeader(CONTEXT_CONTRIBUTOR_HEADER_NAME, CONTEXT_CONTRIBUTOR_HEADER_VALUE); - ServletWebRequest servletWebRequest = new ServletWebRequest(mockServletRequest); - String contributorEnabled = queryExecutor.executeAndExtractJsonPath("{ withDataLoaderGraphQLContext }", "data.withDataLoaderGraphQLContext", servletWebRequest); - assertThat(contributorEnabled).isEqualTo("true"); - } -} \ No newline at end of file diff --git a/graphql-dgs-example-java/src/test/java/RequestHeaderDataFetcherTest.java b/graphql-dgs-example-java/src/test/java/RequestHeaderDataFetcherTest.java deleted file mode 100644 index eac9ee193..000000000 --- a/graphql-dgs-example-java/src/test/java/RequestHeaderDataFetcherTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import com.netflix.graphql.dgs.*; -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration; -import com.netflix.graphql.dgs.autoconfig.DgsExtendedScalarsAutoConfiguration; -import com.netflix.graphql.dgs.example.datafetcher.HelloDataFetcher; -import com.netflix.graphql.dgs.example.shared.dataLoader.MessageDataLoaderWithDispatchPredicate; -import com.netflix.graphql.dgs.example.shared.datafetcher.*; -import com.netflix.graphql.dgs.pagination.DgsPaginationAutoConfiguration; -import com.netflix.graphql.dgs.webmvc.autoconfigure.DgsWebMvcAutoConfiguration; -import org.assertj.core.util.Maps; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.http.HttpHeaders; -import org.springframework.mock.web.MockHttpServletRequest; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.context.request.ServletWebRequest; - -import static org.assertj.core.api.Assertions.assertThat; - -@SpringBootTest(classes = {HelloDataFetcher.class, MovieDataFetcher.class, ConcurrentDataFetcher.class, RequestHeadersDataFetcher.class, DgsExtendedScalarsAutoConfiguration.class, DgsAutoConfiguration.class, DgsPaginationAutoConfiguration.class, DgsWebMvcAutoConfiguration.class}) -class RequestHeaderDataFetcherTest { - - @Autowired - DgsQueryExecutor queryExecutor; - - @Test - void withHeaders() { - MockHttpServletRequest servletRequest = new MockHttpServletRequest(); - servletRequest.addHeader("demo-header", "demo-header-value"); - - String message = queryExecutor.executeAndExtractJsonPath("{demoHeader}", "data.demoHeader", new ServletWebRequest(servletRequest)); - assertThat(message).isEqualTo("demo-header-value"); - } - - @Test - void withHeadersAndNoRequest() { - HttpHeaders headers = new HttpHeaders(); - headers.add("demo-header", "demo-header-value"); - - String message = queryExecutor.executeAndExtractJsonPath("{demoHeader}", "data.demoHeader", headers); - assertThat(message).isEqualTo("demo-header-value"); - } -} \ No newline at end of file diff --git a/graphql-dgs-example-java/src/test/java/subsciption/integrationtest/SubscriptionIntegrationTest.java b/graphql-dgs-example-java/src/test/java/subsciption/integrationtest/SubscriptionIntegrationTest.java deleted file mode 100644 index 60a783b68..000000000 --- a/graphql-dgs-example-java/src/test/java/subsciption/integrationtest/SubscriptionIntegrationTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package subsciption.integrationtest; - - -import com.netflix.graphql.dgs.client.WebSocketGraphQLClient; -import com.netflix.graphql.dgs.example.shared.datafetcher.SubscriptionDataFetcher; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.web.server.LocalServerPort; -import org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient; -import reactor.core.publisher.Flux; -import reactor.test.StepVerifier; - -import java.util.Collections; - - -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = {SubscriptionDataFetcher.class}) -@EnableAutoConfiguration -public class SubscriptionIntegrationTest { - - @LocalServerPort - private Integer port; - - private WebSocketGraphQLClient webSocketGraphQLClient; - - @BeforeEach - public void setup() { - webSocketGraphQLClient = new WebSocketGraphQLClient("ws://localhost:" + port + "/subscriptions", new ReactorNettyWebSocketClient()); - } - - @Test - public void testWebSocketSubscription() { - String subscriptionRequest = "subscription StockWatch { stocks { name price } }"; - Flux starScore = webSocketGraphQLClient.reactiveExecuteQuery(subscriptionRequest, Collections.emptyMap()).take(3).map(r -> r.extractValue("stocks.price")); - StepVerifier.create(starScore) - .expectNext(500.0) - .expectNext(501.0) - .expectNext(502.0) - .thenCancel() - .verify(); - } -} diff --git a/graphql-dgs-example-shared/build.gradle b/graphql-dgs-example-shared/build.gradle index 1fc88eabd..283bdac2e 100644 --- a/graphql-dgs-example-shared/build.gradle +++ b/graphql-dgs-example-shared/build.gradle @@ -15,7 +15,6 @@ */ dependencies { - implementation(project(":graphql-dgs-spring-boot-oss-autoconfigure")) implementation(project(":graphql-dgs-pagination")) implementation(project(":graphql-dgs-extended-scalars")) implementation("io.projectreactor:reactor-core") @@ -23,4 +22,7 @@ dependencies { implementation("org.springframework:spring-web") implementation("com.fasterxml.jackson.core:jackson-databind") testImplementation ('io.projectreactor:reactor-test') + testImplementation(project(":graphql-dgs-spring-graphql-starter-test")) + testImplementation(project(":graphql-dgs-spring-graphql-starter")) + testImplementation("name.nkonev.multipart-spring-graphql:multipart-spring-graphql:1.+") } diff --git a/graphql-dgs-example-shared/dependencies.lock b/graphql-dgs-example-shared/dependencies.lock index 36a6dfbf6..0fcea08b7 100644 --- a/graphql-dgs-example-shared/dependencies.lock +++ b/graphql-dgs-example-shared/dependencies.lock @@ -80,9 +80,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-extended-scalars": { @@ -111,30 +109,14 @@ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "io.micrometer:micrometer-commons": { @@ -163,8 +145,6 @@ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -231,210 +211,27 @@ } }, "implementationDependenciesMetadata": { - "com.fasterxml.jackson.core:jackson-annotations": { - "locked": "2.17.3", - "transitive": [ - "com.fasterxml.jackson.core:jackson-databind", - "com.fasterxml.jackson:jackson-bom" - ] - }, - "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.17.3", - "transitive": [ - "com.fasterxml.jackson.core:jackson-databind", - "com.fasterxml.jackson:jackson-bom" - ] - }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.17.3", - "transitive": [ - "com.fasterxml.jackson:jackson-bom" - ] - }, - "com.fasterxml.jackson:jackson-bom": { - "locked": "2.17.3", - "transitive": [ - "com.fasterxml.jackson.core:jackson-annotations", - "com.fasterxml.jackson.core:jackson-core", - "com.fasterxml.jackson.core:jackson-databind" - ] - }, - "com.graphql-java:graphql-java": { - "locked": "22.3", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-error-types" - ] - }, - "com.graphql-java:graphql-java-extended-scalars": { - "locked": "22.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.graphql-java:java-dataloader": { - "locked": "3.3.0", - "transitive": [ - "com.graphql-java:graphql-java", - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.jayway.jsonpath:json-path": { - "locked": "2.9.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", - "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" - ] + "locked": "2.17.3" }, "com.netflix.graphql.dgs:graphql-dgs-extended-scalars": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-mocking": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] + "project": true }, "com.netflix.graphql.dgs:graphql-dgs-pagination": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] + "project": true }, "com.netflix.graphql.dgs:graphql-dgs-platform": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", - "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-error-types" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, - "com.netflix.graphql.dgs:graphql-error-types": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" - ] - }, - "io.micrometer:micrometer-commons": { - "locked": "1.13.8", - "transitive": [ - "io.micrometer:micrometer-observation" - ] - }, - "io.micrometer:micrometer-observation": { - "locked": "1.13.8", - "transitive": [ - "org.springframework:spring-context", - "org.springframework:spring-web" - ] + "project": true }, "io.projectreactor:reactor-core": { - "locked": "3.6.12", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] + "locked": "3.6.12" }, "org.jetbrains.kotlin:kotlin-stdlib": { - "locked": "2.0.21", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", - "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-error-types" - ] - }, - "org.reactivestreams:reactive-streams": { - "locked": "1.0.4", - "transitive": [ - "com.graphql-java:graphql-java", - "io.projectreactor:reactor-core" - ] - }, - "org.slf4j:slf4j-api": { - "locked": "2.0.16", - "transitive": [ - "com.graphql-java:java-dataloader" - ] - }, - "org.springframework:spring-aop": { - "locked": "6.1.15", - "transitive": [ - "org.springframework:spring-context" - ] - }, - "org.springframework:spring-beans": { - "locked": "6.1.15", - "transitive": [ - "org.springframework:spring-aop", - "org.springframework:spring-context", - "org.springframework:spring-web" - ] + "locked": "2.0.21" }, "org.springframework:spring-context": { "locked": "6.1.15" }, - "org.springframework:spring-core": { - "locked": "6.1.15", - "transitive": [ - "org.springframework:spring-aop", - "org.springframework:spring-beans", - "org.springframework:spring-context", - "org.springframework:spring-expression", - "org.springframework:spring-web" - ] - }, - "org.springframework:spring-expression": { - "locked": "6.1.15", - "transitive": [ - "org.springframework:spring-context" - ] - }, - "org.springframework:spring-jcl": { - "locked": "6.1.15", - "transitive": [ - "org.springframework:spring-core" - ] - }, "org.springframework:spring-web": { "locked": "6.1.15" } @@ -560,9 +357,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-extended-scalars": { @@ -591,30 +386,14 @@ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "io.micrometer:micrometer-commons": { @@ -655,8 +434,6 @@ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -821,9 +598,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-extended-scalars": { @@ -852,30 +627,14 @@ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "io.micrometer:micrometer-commons": { @@ -916,8 +675,6 @@ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -1037,30 +794,48 @@ "com.fasterxml.jackson.core:jackson-databind", "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", "com.fasterxml.jackson.module:jackson-module-kotlin", - "com.fasterxml.jackson:jackson-bom" + "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, "com.fasterxml.jackson.core:jackson-core": { "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", "com.fasterxml.jackson:jackson-bom" ] }, "com.fasterxml.jackson.core:jackson-databind": { "locked": "2.17.3", "transitive": [ + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", "com.fasterxml.jackson.module:jackson-module-kotlin", - "com.fasterxml.jackson:jackson-bom" + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", + "org.springframework.boot:spring-boot-starter-json" ] }, "com.fasterxml.jackson.datatype:jackson-datatype-jsr310": { "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson:jackson-bom", - "com.netflix.graphql.dgs:graphql-dgs" + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.boot:spring-boot-starter-json" ] }, "com.fasterxml.jackson.module:jackson-module-kotlin": { @@ -1068,7 +843,17 @@ "transitive": [ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" + ] + }, + "com.fasterxml.jackson.module:jackson-module-parameter-names": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", + "org.springframework.boot:spring-boot-starter-json" ] }, "com.fasterxml.jackson:jackson-bom": { @@ -1077,8 +862,10 @@ "com.fasterxml.jackson.core:jackson-annotations", "com.fasterxml.jackson.core:jackson-core", "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", - "com.fasterxml.jackson.module:jackson-module-kotlin" + "com.fasterxml.jackson.module:jackson-module-kotlin", + "com.fasterxml.jackson.module:jackson-module-parameter-names" ] }, "com.github.curious-odd-man:rgxgen": { @@ -1105,10 +892,14 @@ "com.apollographql.federation:federation-graphql-java-support", "com.graphql-java:graphql-java-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test" ] }, "com.graphql-java:graphql-java-extended-scalars": { @@ -1130,8 +921,10 @@ "locked": "2.9.0", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.springframework.boot:spring-boot-starter-test" + "org.springframework.boot:spring-boot-starter-test", + "org.springframework.graphql:spring-graphql-test" ] }, "com.netflix.graphql.dgs:graphql-dgs": { @@ -1140,8 +933,15 @@ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-client": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-extended-scalars": { @@ -1167,25 +967,58 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-error-types": { @@ -1193,7 +1026,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -1207,7 +1040,8 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.graphql:spring-graphql" ] }, "io.micrometer:micrometer-commons": { @@ -1283,12 +1117,22 @@ "io.mockk:mockk" ] }, + "io.projectreactor.kotlin:reactor-kotlin-extensions": { + "locked": "1.2.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-reactive" + ] + }, "io.projectreactor:reactor-core": { "locked": "3.6.12", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", + "io.projectreactor.kotlin:reactor-kotlin-extensions", "io.projectreactor:reactor-test", - "org.jetbrains.kotlinx:kotlinx-coroutines-reactor" + "org.jetbrains.kotlinx:kotlinx-coroutines-reactor", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test" ] }, "io.projectreactor:reactor-test": { @@ -1321,6 +1165,9 @@ "io.mockk:mockk-jvm" ] }, + "name.nkonev.multipart-spring-graphql:multipart-spring-graphql": { + "locked": "1.5.2" + }, "net.bytebuddy:byte-buddy": { "locked": "1.14.19", "transitive": [ @@ -1361,12 +1208,6 @@ "org.openjdk.jmh:jmh-core" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.commons:commons-math3": { "locked": "3.6.1", "transitive": [ @@ -1418,7 +1259,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -1429,11 +1269,16 @@ "locked": "2.0.21", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", "io.mockk:mockk-agent-jvm", @@ -1460,6 +1305,7 @@ "locked": "1.8.1", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-reactive", "io.mockk:mockk-dsl-jvm", "io.mockk:mockk-jvm", "org.jetbrains.kotlinx:kotlinx-coroutines-bom", @@ -1489,8 +1335,9 @@ ] }, "org.jetbrains:annotations": { - "locked": "23.0.0", + "locked": "26.0.1", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "org.jetbrains.kotlin:kotlin-stdlib", "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm" ] @@ -1661,6 +1508,8 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-pagination", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "org.springframework.boot:spring-boot-starter", "org.springframework.boot:spring-boot-test-autoconfigure" ] @@ -1668,10 +1517,24 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "name.nkonev.multipart-spring-graphql:multipart-spring-graphql" + ] + }, + "org.springframework.boot:spring-boot-starter-json": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework.boot:spring-boot-starter-logging": { "locked": "3.3.6", "transitive": [ @@ -1691,9 +1554,24 @@ "org.springframework.boot:spring-boot-test-autoconfigure": { "locked": "3.3.6", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.graphql:spring-graphql-test" + ] + }, + "org.springframework.graphql:spring-graphql-test": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ @@ -1712,7 +1590,10 @@ "locked": "6.1.15", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "org.springframework.boot:spring-boot" + "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test", + "org.springframework:spring-websocket" ] }, "org.springframework:spring-core": { @@ -1726,7 +1607,8 @@ "org.springframework:spring-context", "org.springframework:spring-expression", "org.springframework:spring-test", - "org.springframework:spring-web" + "org.springframework:spring-web", + "org.springframework:spring-websocket" ] }, "org.springframework:spring-expression": { @@ -1745,15 +1627,24 @@ "locked": "6.1.15", "transitive": [ "org.springframework.boot:spring-boot-starter-test", - "org.springframework.boot:spring-boot-test" + "org.springframework.boot:spring-boot-test", + "org.springframework.graphql:spring-graphql-test" ] }, "org.springframework:spring-web": { "locked": "6.1.15", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.boot:spring-boot-starter-json", + "org.springframework:spring-websocket" + ] + }, + "org.springframework:spring-websocket": { + "locked": "6.1.15", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, "org.xmlunit:xmlunit-core": { @@ -2124,18 +2015,6 @@ } }, "runtimeClasspath": { - "ch.qos.logback:logback-classic": { - "locked": "1.5.12", - "transitive": [ - "org.springframework.boot:spring-boot-starter-logging" - ] - }, - "ch.qos.logback:logback-core": { - "locked": "1.5.12", - "transitive": [ - "ch.qos.logback:logback-classic" - ] - }, "com.apollographql.federation:federation-graphql-java-support": { "locked": "5.2.0", "transitive": [ @@ -2179,8 +2058,7 @@ "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson:jackson-bom", - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs" ] }, "com.fasterxml.jackson:jackson-bom": { @@ -2250,9 +2128,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-extended-scalars": { @@ -2281,38 +2157,21 @@ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "io.micrometer:context-propagation": { "locked": "1.1.2", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "io.micrometer:micrometer-commons": { @@ -2335,12 +2194,6 @@ "org.jetbrains.kotlinx:kotlinx-coroutines-reactor" ] }, - "jakarta.annotation:jakarta.annotation-api": { - "locked": "2.1.1", - "transitive": [ - "org.springframework.boot:spring-boot-starter" - ] - }, "net.datafaker:datafaker": { "locked": "2.4.2", "transitive": [ @@ -2359,32 +2212,11 @@ "com.jayway.jsonpath:json-path" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, - "org.apache.logging.log4j:log4j-api": { - "locked": "2.23.1", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.apache.logging.log4j:log4j-to-slf4j" - ] - }, - "org.apache.logging.log4j:log4j-to-slf4j": { - "locked": "2.23.1", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.springframework.boot:spring-boot-starter-logging" - ] - }, "org.jetbrains.kotlin:kotlin-reflect": { "locked": "2.0.21", "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs" ] }, "org.jetbrains.kotlin:kotlin-stdlib": { @@ -2394,8 +2226,6 @@ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types", "org.jetbrains.kotlin:kotlin-reflect", "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm", @@ -2462,49 +2292,26 @@ "org.jetbrains.kotlinx:kotlinx-coroutines-reactive" ] }, - "org.slf4j:jul-to-slf4j": { - "locked": "2.0.16", - "transitive": [ - "org.springframework.boot:spring-boot-starter-logging" - ] - }, "org.slf4j:slf4j-api": { "locked": "2.0.16", "transitive": [ - "ch.qos.logback:logback-classic", "com.apollographql.federation:federation-graphql-java-support", "com.graphql-java:java-dataloader", "com.jayway.jsonpath:json-path", - "com.netflix.graphql.dgs:graphql-dgs-mocking", - "org.apache.logging.log4j:log4j-to-slf4j", - "org.slf4j:jul-to-slf4j" + "com.netflix.graphql.dgs:graphql-dgs-mocking" ] }, "org.springframework.boot:spring-boot": { "locked": "3.3.6", "transitive": [ - "org.springframework.boot:spring-boot-autoconfigure", - "org.springframework.boot:spring-boot-starter" + "org.springframework.boot:spring-boot-autoconfigure" ] }, "org.springframework.boot:spring-boot-autoconfigure": { "locked": "3.3.6", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", - "com.netflix.graphql.dgs:graphql-dgs-pagination", - "org.springframework.boot:spring-boot-starter" - ] - }, - "org.springframework.boot:spring-boot-starter": { - "locked": "3.3.6", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, - "org.springframework.boot:spring-boot-starter-logging": { - "locked": "3.3.6", - "transitive": [ - "org.springframework.boot:spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-pagination" ] }, "org.springframework:spring-aop": { @@ -2532,7 +2339,6 @@ "locked": "6.1.15", "transitive": [ "org.springframework.boot:spring-boot", - "org.springframework.boot:spring-boot-starter", "org.springframework:spring-aop", "org.springframework:spring-beans", "org.springframework:spring-context", @@ -2555,16 +2361,13 @@ "org.springframework:spring-web": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs" ] }, "org.yaml:snakeyaml": { "locked": "2.2", "transitive": [ - "net.datafaker:datafaker", - "org.springframework.boot:spring-boot-starter" + "net.datafaker:datafaker" ] } }, @@ -2585,20 +2388,51 @@ "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson.core:jackson-databind", - "com.fasterxml.jackson:jackson-bom" + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, "com.fasterxml.jackson.core:jackson-core": { "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", "com.fasterxml.jackson:jackson-bom" ] }, "com.fasterxml.jackson.core:jackson-databind": { "locked": "2.17.3", "transitive": [ - "com.fasterxml.jackson:jackson-bom" + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.module:jackson-module-parameter-names": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" ] }, "com.fasterxml.jackson:jackson-bom": { @@ -2606,7 +2440,10 @@ "transitive": [ "com.fasterxml.jackson.core:jackson-annotations", "com.fasterxml.jackson.core:jackson-core", - "com.fasterxml.jackson.core:jackson-databind" + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names" ] }, "com.graphql-java:graphql-java": { @@ -2615,7 +2452,10 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test" ] }, "com.graphql-java:graphql-java-extended-scalars": { @@ -2637,8 +2477,10 @@ "locked": "2.9.0", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.springframework.boot:spring-boot-starter-test" + "org.springframework.boot:spring-boot-starter-test", + "org.springframework.graphql:spring-graphql-test" ] }, "com.netflix.graphql.dgs:graphql-dgs": { @@ -2647,8 +2489,14 @@ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-reactive" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-client": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-extended-scalars": { @@ -2674,25 +2522,57 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-error-types": { @@ -2700,7 +2580,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -2783,8 +2663,11 @@ "io.projectreactor:reactor-core": { "locked": "3.6.12", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", - "io.projectreactor:reactor-test" + "io.projectreactor:reactor-test", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test" ] }, "io.projectreactor:reactor-test": { @@ -2811,6 +2694,9 @@ "org.springframework.boot:spring-boot-starter-test" ] }, + "name.nkonev.multipart-spring-graphql:multipart-spring-graphql": { + "locked": "1.5.2" + }, "net.bytebuddy:byte-buddy": { "locked": "1.14.19", "transitive": [ @@ -2883,11 +2769,16 @@ "locked": "2.0.21", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", "io.mockk:mockk-agent-jvm", @@ -3018,9 +2909,24 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "name.nkonev.multipart-spring-graphql:multipart-spring-graphql" + ] + }, + "org.springframework.boot:spring-boot-starter-json": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework.boot:spring-boot-starter-logging": { "locked": "3.3.6", "transitive": [ @@ -3043,6 +2949,19 @@ "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.graphql:spring-graphql-test" + ] + }, + "org.springframework.graphql:spring-graphql-test": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ @@ -3060,7 +2979,9 @@ "org.springframework:spring-context": { "locked": "6.1.15", "transitive": [ - "org.springframework.boot:spring-boot" + "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test" ] }, "org.springframework:spring-core": { @@ -3093,11 +3014,15 @@ "locked": "6.1.15", "transitive": [ "org.springframework.boot:spring-boot-starter-test", - "org.springframework.boot:spring-boot-test" + "org.springframework.boot:spring-boot-test", + "org.springframework.graphql:spring-graphql-test" ] }, "org.springframework:spring-web": { - "locked": "6.1.15" + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot-starter-json" + ] }, "org.xmlunit:xmlunit-core": { "locked": "2.9.1", @@ -3129,20 +3054,51 @@ "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson.core:jackson-databind", - "com.fasterxml.jackson:jackson-bom" + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, "com.fasterxml.jackson.core:jackson-core": { "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", "com.fasterxml.jackson:jackson-bom" ] }, "com.fasterxml.jackson.core:jackson-databind": { "locked": "2.17.3", "transitive": [ - "com.fasterxml.jackson:jackson-bom" + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.module:jackson-module-parameter-names": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" ] }, "com.fasterxml.jackson:jackson-bom": { @@ -3150,7 +3106,10 @@ "transitive": [ "com.fasterxml.jackson.core:jackson-annotations", "com.fasterxml.jackson.core:jackson-core", - "com.fasterxml.jackson.core:jackson-databind" + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names" ] }, "com.graphql-java:graphql-java": { @@ -3159,7 +3118,10 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test" ] }, "com.graphql-java:graphql-java-extended-scalars": { @@ -3181,8 +3143,10 @@ "locked": "2.9.0", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.springframework.boot:spring-boot-starter-test" + "org.springframework.boot:spring-boot-starter-test", + "org.springframework.graphql:spring-graphql-test" ] }, "com.netflix.graphql.dgs:graphql-dgs": { @@ -3191,8 +3155,14 @@ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-reactive" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-client": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-extended-scalars": { @@ -3218,25 +3188,57 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-error-types": { @@ -3244,7 +3246,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -3297,8 +3299,11 @@ "io.projectreactor:reactor-core": { "locked": "3.6.12", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", - "io.projectreactor:reactor-test" + "io.projectreactor:reactor-test", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test" ] }, "io.projectreactor:reactor-test": { @@ -3325,6 +3330,9 @@ "org.springframework.boot:spring-boot-starter-test" ] }, + "name.nkonev.multipart-spring-graphql:multipart-spring-graphql": { + "locked": "1.5.2" + }, "net.bytebuddy:byte-buddy": { "locked": "1.14.19", "transitive": [ @@ -3395,11 +3403,16 @@ "locked": "2.0.21", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk", "io.mockk:mockk-agent", @@ -3518,9 +3531,24 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "name.nkonev.multipart-spring-graphql:multipart-spring-graphql" + ] + }, + "org.springframework.boot:spring-boot-starter-json": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework.boot:spring-boot-starter-logging": { "locked": "3.3.6", "transitive": [ @@ -3543,6 +3571,19 @@ "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.graphql:spring-graphql-test" + ] + }, + "org.springframework.graphql:spring-graphql-test": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ @@ -3560,7 +3601,9 @@ "org.springframework:spring-context": { "locked": "6.1.15", "transitive": [ - "org.springframework.boot:spring-boot" + "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test" ] }, "org.springframework:spring-core": { @@ -3593,11 +3636,15 @@ "locked": "6.1.15", "transitive": [ "org.springframework.boot:spring-boot-starter-test", - "org.springframework.boot:spring-boot-test" + "org.springframework.boot:spring-boot-test", + "org.springframework.graphql:spring-graphql-test" ] }, "org.springframework:spring-web": { - "locked": "6.1.15" + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot-starter-json" + ] }, "org.xmlunit:xmlunit-core": { "locked": "2.9.1", @@ -3638,30 +3685,48 @@ "com.fasterxml.jackson.core:jackson-databind", "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", "com.fasterxml.jackson.module:jackson-module-kotlin", - "com.fasterxml.jackson:jackson-bom" + "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, "com.fasterxml.jackson.core:jackson-core": { "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", "com.fasterxml.jackson:jackson-bom" ] }, "com.fasterxml.jackson.core:jackson-databind": { "locked": "2.17.3", "transitive": [ + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", "com.fasterxml.jackson.module:jackson-module-kotlin", - "com.fasterxml.jackson:jackson-bom" + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", + "org.springframework.boot:spring-boot-starter-json" ] }, "com.fasterxml.jackson.datatype:jackson-datatype-jsr310": { "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson:jackson-bom", - "com.netflix.graphql.dgs:graphql-dgs" + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.boot:spring-boot-starter-json" ] }, "com.fasterxml.jackson.module:jackson-module-kotlin": { @@ -3669,7 +3734,17 @@ "transitive": [ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" + ] + }, + "com.fasterxml.jackson.module:jackson-module-parameter-names": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", + "org.springframework.boot:spring-boot-starter-json" ] }, "com.fasterxml.jackson:jackson-bom": { @@ -3678,8 +3753,10 @@ "com.fasterxml.jackson.core:jackson-annotations", "com.fasterxml.jackson.core:jackson-core", "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", - "com.fasterxml.jackson.module:jackson-module-kotlin" + "com.fasterxml.jackson.module:jackson-module-kotlin", + "com.fasterxml.jackson.module:jackson-module-parameter-names" ] }, "com.github.curious-odd-man:rgxgen": { @@ -3706,10 +3783,14 @@ "com.apollographql.federation:federation-graphql-java-support", "com.graphql-java:graphql-java-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test" ] }, "com.graphql-java:graphql-java-extended-scalars": { @@ -3731,8 +3812,10 @@ "locked": "2.9.0", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.springframework.boot:spring-boot-starter-test" + "org.springframework.boot:spring-boot-starter-test", + "org.springframework.graphql:spring-graphql-test" ] }, "com.netflix.graphql.dgs:graphql-dgs": { @@ -3741,8 +3824,15 @@ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-client": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-extended-scalars": { @@ -3768,25 +3858,58 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-error-types": { @@ -3794,7 +3917,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -3808,7 +3931,8 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.graphql:spring-graphql" ] }, "io.micrometer:micrometer-commons": { @@ -3884,12 +4008,22 @@ "io.mockk:mockk" ] }, + "io.projectreactor.kotlin:reactor-kotlin-extensions": { + "locked": "1.2.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-reactive" + ] + }, "io.projectreactor:reactor-core": { "locked": "3.6.12", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", + "io.projectreactor.kotlin:reactor-kotlin-extensions", "io.projectreactor:reactor-test", - "org.jetbrains.kotlinx:kotlinx-coroutines-reactor" + "org.jetbrains.kotlinx:kotlinx-coroutines-reactor", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test" ] }, "io.projectreactor:reactor-test": { @@ -3922,6 +4056,9 @@ "io.mockk:mockk-jvm" ] }, + "name.nkonev.multipart-spring-graphql:multipart-spring-graphql": { + "locked": "1.5.2" + }, "net.bytebuddy:byte-buddy": { "locked": "1.14.19", "transitive": [ @@ -3956,12 +4093,6 @@ "org.springframework.boot:spring-boot-starter-test" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.logging.log4j:log4j-api": { "locked": "2.23.1", "transitive": [ @@ -4007,7 +4138,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -4018,11 +4148,16 @@ "locked": "2.0.21", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-pagination", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", "io.mockk:mockk-agent-jvm", @@ -4049,6 +4184,7 @@ "locked": "1.8.1", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-reactive", "io.mockk:mockk-dsl-jvm", "io.mockk:mockk-jvm", "org.jetbrains.kotlinx:kotlinx-coroutines-bom", @@ -4078,8 +4214,9 @@ ] }, "org.jetbrains:annotations": { - "locked": "23.0.0", + "locked": "26.0.1", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", "org.jetbrains.kotlin:kotlin-stdlib", "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm" ] @@ -4221,6 +4358,8 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-pagination", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "org.springframework.boot:spring-boot-starter", "org.springframework.boot:spring-boot-test-autoconfigure" ] @@ -4228,10 +4367,24 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "name.nkonev.multipart-spring-graphql:multipart-spring-graphql" + ] + }, + "org.springframework.boot:spring-boot-starter-json": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework.boot:spring-boot-starter-logging": { "locked": "3.3.6", "transitive": [ @@ -4251,9 +4404,24 @@ "org.springframework.boot:spring-boot-test-autoconfigure": { "locked": "3.3.6", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.graphql:spring-graphql-test" + ] + }, + "org.springframework.graphql:spring-graphql-test": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ @@ -4272,7 +4440,10 @@ "locked": "6.1.15", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "org.springframework.boot:spring-boot" + "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test", + "org.springframework:spring-websocket" ] }, "org.springframework:spring-core": { @@ -4286,7 +4457,8 @@ "org.springframework:spring-context", "org.springframework:spring-expression", "org.springframework:spring-test", - "org.springframework:spring-web" + "org.springframework:spring-web", + "org.springframework:spring-websocket" ] }, "org.springframework:spring-expression": { @@ -4305,15 +4477,24 @@ "locked": "6.1.15", "transitive": [ "org.springframework.boot:spring-boot-starter-test", - "org.springframework.boot:spring-boot-test" + "org.springframework.boot:spring-boot-test", + "org.springframework.graphql:spring-graphql-test" ] }, "org.springframework:spring-web": { "locked": "6.1.15", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.boot:spring-boot-starter-json", + "org.springframework:spring-websocket" + ] + }, + "org.springframework:spring-websocket": { + "locked": "6.1.15", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, "org.xmlunit:xmlunit-core": { diff --git a/graphql-dgs-example-shared/src/test/java/com/netflix/graphql/dgs/example/shared/ConcurrentDataFetcherTest.java b/graphql-dgs-example-shared/src/test/java/com/netflix/graphql/dgs/example/shared/ConcurrentDataFetcherTest.java deleted file mode 100644 index d560d503c..000000000 --- a/graphql-dgs-example-shared/src/test/java/com/netflix/graphql/dgs/example/shared/ConcurrentDataFetcherTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.example.shared; - -import com.jayway.jsonpath.DocumentContext; -import com.netflix.graphql.dgs.DgsQueryExecutor; -import org.assertj.core.data.Percentage; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; - -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; - -@Disabled("The need of this test is questionable, since the concurrent execution of data fetchers is left to the graphql-java engine.") -@ExampleSpringBootTest -class ConcurrentDataFetcherTest { - - @Autowired - DgsQueryExecutor queryExecutor; - - @Test - void concurrent() { - - DocumentContext documentContext = queryExecutor.executeAndGetDocumentContext("{concurrent1, concurrent2}"); - int ts1 = documentContext.read("data.concurrent1"); - int ts2 = documentContext.read("data.concurrent2"); - // you can't assume the order of execution of unrelated fields, in this case data.concurrent2 can be fetched - // before data.concurrent1 or vice versa. - assertThat(ts1).isCloseTo(ts2, Percentage.withPercentage(10.0)); - } -} \ No newline at end of file diff --git a/graphql-dgs-example-shared/src/test/java/com/netflix/graphql/dgs/example/shared/ExampleSpringBootTest.java b/graphql-dgs-example-shared/src/test/java/com/netflix/graphql/dgs/example/shared/ExampleSpringBootTest.java index 017f911da..b065ad410 100644 --- a/graphql-dgs-example-shared/src/test/java/com/netflix/graphql/dgs/example/shared/ExampleSpringBootTest.java +++ b/graphql-dgs-example-shared/src/test/java/com/netflix/graphql/dgs/example/shared/ExampleSpringBootTest.java @@ -16,12 +16,13 @@ package com.netflix.graphql.dgs.example.shared; -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration; import com.netflix.graphql.dgs.autoconfig.DgsExtendedScalarsAutoConfiguration; import com.netflix.graphql.dgs.example.datafetcher.HelloDataFetcher; import com.netflix.graphql.dgs.example.shared.dataLoader.MessageDataLoaderWithDispatchPredicate; import com.netflix.graphql.dgs.example.shared.datafetcher.*; import com.netflix.graphql.dgs.pagination.DgsPaginationAutoConfiguration; +import com.netflix.graphql.dgs.scalars.UploadScalar; +import com.netflix.graphql.dgs.test.EnableDgsTest; import org.springframework.boot.test.context.SpringBootTest; import java.lang.annotation.ElementType; @@ -31,6 +32,7 @@ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) -@SpringBootTest(classes = {HelloDataFetcher.class, MovieDataFetcher.class, ConcurrentDataFetcher.class, RequestHeadersDataFetcher.class, RatingMutation.class, CurrentTimeDateFetcher.class, DgsExtendedScalarsAutoConfiguration.class, DgsAutoConfiguration.class, DgsPaginationAutoConfiguration.class, MessageDataLoaderWithDispatchPredicate.class}) +@SpringBootTest(classes = {HelloDataFetcher.class, MovieDataFetcher.class, ConcurrentDataFetcher.class, RequestHeadersDataFetcher.class, RatingMutation.class, CurrentTimeDateFetcher.class, DgsExtendedScalarsAutoConfiguration.class, DgsPaginationAutoConfiguration.class, MessageDataLoaderWithDispatchPredicate.class, UploadScalar.class}) +@EnableDgsTest public @interface ExampleSpringBootTest { } diff --git a/graphql-dgs-example-shared/src/test/java/com/netflix/graphql/dgs/example/shared/datafetcher/SubscriptionDataFetcherTest.java b/graphql-dgs-example-shared/src/test/java/com/netflix/graphql/dgs/example/shared/datafetcher/SubscriptionDataFetcherTest.java index 94adc8a59..ed11944a1 100644 --- a/graphql-dgs-example-shared/src/test/java/com/netflix/graphql/dgs/example/shared/datafetcher/SubscriptionDataFetcherTest.java +++ b/graphql-dgs-example-shared/src/test/java/com/netflix/graphql/dgs/example/shared/datafetcher/SubscriptionDataFetcherTest.java @@ -18,10 +18,11 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.netflix.graphql.dgs.DgsQueryExecutor; -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration; import com.netflix.graphql.dgs.autoconfig.DgsExtendedScalarsAutoConfiguration; import com.netflix.graphql.dgs.example.shared.types.Stock; import com.netflix.graphql.dgs.pagination.DgsPaginationAutoConfiguration; +import com.netflix.graphql.dgs.scalars.UploadScalar; +import com.netflix.graphql.dgs.test.EnableDgsTest; import graphql.ExecutionResult; import org.junit.jupiter.api.Test; import org.reactivestreams.Publisher; @@ -34,7 +35,8 @@ import static org.assertj.core.api.Assertions.assertThat; -@SpringBootTest(classes = {DgsAutoConfiguration.class, SubscriptionDataFetcher.class, DgsExtendedScalarsAutoConfiguration.class, DgsPaginationAutoConfiguration.class}) +@SpringBootTest(classes = {SubscriptionDataFetcher.class, DgsExtendedScalarsAutoConfiguration.class, DgsPaginationAutoConfiguration.class, UploadScalar.class}) +@EnableDgsTest class SubscriptionDataFetcherTest { @Autowired diff --git a/graphql-dgs-extended-scalars/build.gradle.kts b/graphql-dgs-extended-scalars/build.gradle.kts index b0c81aa6e..72040e09d 100644 --- a/graphql-dgs-extended-scalars/build.gradle.kts +++ b/graphql-dgs-extended-scalars/build.gradle.kts @@ -19,5 +19,5 @@ dependencies { api("com.graphql-java:graphql-java-extended-scalars") implementation("org.springframework.boot:spring-boot-autoconfigure") - testImplementation(project(":graphql-dgs-spring-boot-starter")) + testImplementation(project(":graphql-dgs-spring-graphql-starter")) } diff --git a/graphql-dgs-extended-scalars/dependencies.lock b/graphql-dgs-extended-scalars/dependencies.lock index 9f4a0042e..a2aa48493 100644 --- a/graphql-dgs-extended-scalars/dependencies.lock +++ b/graphql-dgs-extended-scalars/dependencies.lock @@ -953,7 +953,7 @@ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-starter-json" ] }, @@ -963,8 +963,8 @@ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -1015,7 +1015,8 @@ "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql" ] }, "com.graphql-java:graphql-java-extended-scalars": { @@ -1045,16 +1046,15 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -1070,40 +1070,32 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { @@ -1118,8 +1110,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -1133,7 +1124,8 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.graphql:spring-graphql" ] }, "io.micrometer:micrometer-commons": { @@ -1209,12 +1201,20 @@ "io.mockk:mockk" ] }, + "io.projectreactor.kotlin:reactor-kotlin-extensions": { + "locked": "1.2.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-reactive" + ] + }, "io.projectreactor:reactor-core": { "locked": "3.6.12", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.jetbrains.kotlinx:kotlinx-coroutines-reactor" + "io.projectreactor.kotlin:reactor-kotlin-extensions", + "org.jetbrains.kotlinx:kotlinx-coroutines-reactor", + "org.springframework.graphql:spring-graphql" ] }, "jakarta.activation:jakarta.activation-api": { @@ -1226,14 +1226,7 @@ "jakarta.annotation:jakarta.annotation-api": { "locked": "2.1.1", "transitive": [ - "org.springframework.boot:spring-boot-starter", - "org.springframework.boot:spring-boot-starter-tomcat" - ] - }, - "jakarta.servlet:jakarta.servlet-api": { - "locked": "6.0.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "org.springframework.boot:spring-boot-starter" ] }, "jakarta.xml.bind:jakarta.xml.bind-api": { @@ -1288,12 +1281,6 @@ "org.openjdk.jmh:jmh-core" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.commons:commons-math3": { "locked": "3.6.1", "transitive": [ @@ -1314,25 +1301,6 @@ "org.springframework.boot:spring-boot-starter-logging" ] }, - "org.apache.tomcat.embed:tomcat-embed-core": { - "locked": "10.1.33", - "transitive": [ - "org.apache.tomcat.embed:tomcat-embed-websocket", - "org.springframework.boot:spring-boot-starter-tomcat" - ] - }, - "org.apache.tomcat.embed:tomcat-embed-el": { - "locked": "10.1.33", - "transitive": [ - "org.springframework.boot:spring-boot-starter-tomcat" - ] - }, - "org.apache.tomcat.embed:tomcat-embed-websocket": { - "locked": "10.1.33", - "transitive": [ - "org.springframework.boot:spring-boot-starter-tomcat" - ] - }, "org.assertj:assertj-core": { "locked": "3.25.3", "transitive": [ @@ -1364,7 +1332,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -1377,10 +1344,9 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", @@ -1408,6 +1374,7 @@ "locked": "1.8.1", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-reactive", "io.mockk:mockk-dsl-jvm", "io.mockk:mockk-jvm", "org.jetbrains.kotlinx:kotlinx-coroutines-bom", @@ -1608,6 +1575,7 @@ "org.springframework.boot:spring-boot-autoconfigure": { "locked": "3.3.6", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-starter", "org.springframework.boot:spring-boot-test-autoconfigure" ] @@ -1615,17 +1583,21 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", - "org.springframework.boot:spring-boot-starter-test", - "org.springframework.boot:spring-boot-starter-web" + "org.springframework.boot:spring-boot-starter-test" + ] + }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "org.springframework.boot:spring-boot-starter-json": { "locked": "3.3.6", "transitive": [ - "org.springframework.boot:spring-boot-starter-web" + "org.springframework.boot:spring-boot-starter-graphql" ] }, "org.springframework.boot:spring-boot-starter-logging": { @@ -1637,25 +1609,6 @@ "org.springframework.boot:spring-boot-starter-test": { "locked": "3.3.6" }, - "org.springframework.boot:spring-boot-starter-tomcat": { - "locked": "3.3.6", - "transitive": [ - "org.springframework.boot:spring-boot-starter-web" - ] - }, - "org.springframework.boot:spring-boot-starter-web": { - "locked": "3.3.6", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "org.springframework.boot:spring-boot-starter-websocket" - ] - }, - "org.springframework.boot:spring-boot-starter-websocket": { - "locked": "3.3.6", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, "org.springframework.boot:spring-boot-test": { "locked": "3.3.6", "transitive": [ @@ -1669,11 +1622,17 @@ "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ - "org.springframework:spring-context", - "org.springframework:spring-webmvc" + "org.springframework:spring-context" ] }, "org.springframework:spring-beans": { @@ -1681,9 +1640,7 @@ "transitive": [ "org.springframework:spring-aop", "org.springframework:spring-context", - "org.springframework:spring-messaging", - "org.springframework:spring-web", - "org.springframework:spring-webmvc" + "org.springframework:spring-web" ] }, "org.springframework:spring-context": { @@ -1691,7 +1648,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "org.springframework.boot:spring-boot", - "org.springframework:spring-webmvc", + "org.springframework.graphql:spring-graphql", "org.springframework:spring-websocket" ] }, @@ -1705,18 +1662,15 @@ "org.springframework:spring-beans", "org.springframework:spring-context", "org.springframework:spring-expression", - "org.springframework:spring-messaging", "org.springframework:spring-test", "org.springframework:spring-web", - "org.springframework:spring-webmvc", "org.springframework:spring-websocket" ] }, "org.springframework:spring-expression": { "locked": "6.1.15", "transitive": [ - "org.springframework:spring-context", - "org.springframework:spring-webmvc" + "org.springframework:spring-context" ] }, "org.springframework:spring-jcl": { @@ -1725,12 +1679,6 @@ "org.springframework:spring-core" ] }, - "org.springframework:spring-messaging": { - "locked": "6.1.15", - "transitive": [ - "org.springframework.boot:spring-boot-starter-websocket" - ] - }, "org.springframework:spring-test": { "locked": "6.1.15", "transitive": [ @@ -1743,26 +1691,15 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-starter-json", - "org.springframework.boot:spring-boot-starter-web", - "org.springframework:spring-webmvc", "org.springframework:spring-websocket" ] }, - "org.springframework:spring-webmvc": { - "locked": "6.1.15", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "org.springframework.boot:spring-boot-starter-web" - ] - }, "org.springframework:spring-websocket": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "org.springframework.boot:spring-boot-starter-websocket" + "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, "org.xmlunit:xmlunit-core": { @@ -2481,15 +2418,63 @@ "com.fasterxml.jackson.core:jackson-annotations": { "locked": "2.17.3", "transitive": [ + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, + "com.fasterxml.jackson.core:jackson-core": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom" + ] + }, + "com.fasterxml.jackson.core:jackson-databind": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.module:jackson-module-parameter-names": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, "com.fasterxml.jackson:jackson-bom": { "locked": "2.17.3", "transitive": [ - "com.fasterxml.jackson.core:jackson-annotations" + "com.fasterxml.jackson.core:jackson-annotations", + "com.fasterxml.jackson.core:jackson-core", + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names" ] }, "com.graphql-java:graphql-java": { @@ -2499,7 +2484,8 @@ "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql" ] }, "com.graphql-java:graphql-java-extended-scalars": { @@ -2529,16 +2515,14 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -2554,40 +2538,31 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { @@ -2602,8 +2577,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -2621,7 +2595,8 @@ "io.micrometer:micrometer-observation": { "locked": "1.13.8", "transitive": [ - "org.springframework:spring-context" + "org.springframework:spring-context", + "org.springframework:spring-web" ] }, "io.mockk:mockk": { @@ -2686,7 +2661,8 @@ "locked": "3.6.12", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-platform", + "org.springframework.graphql:spring-graphql" ] }, "jakarta.activation:jakarta.activation-api": { @@ -2781,10 +2757,9 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", @@ -2916,9 +2891,23 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "org.springframework.boot:spring-boot-starter-json": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework.boot:spring-boot-starter-logging": { "locked": "3.3.6", "transitive": [ @@ -2941,6 +2930,12 @@ "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ @@ -2951,13 +2946,15 @@ "locked": "6.1.15", "transitive": [ "org.springframework:spring-aop", - "org.springframework:spring-context" + "org.springframework:spring-context", + "org.springframework:spring-web" ] }, "org.springframework:spring-context": { "locked": "6.1.15", "transitive": [ - "org.springframework.boot:spring-boot" + "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql" ] }, "org.springframework:spring-core": { @@ -2970,7 +2967,8 @@ "org.springframework:spring-beans", "org.springframework:spring-context", "org.springframework:spring-expression", - "org.springframework:spring-test" + "org.springframework:spring-test", + "org.springframework:spring-web" ] }, "org.springframework:spring-expression": { @@ -2992,6 +2990,12 @@ "org.springframework.boot:spring-boot-test" ] }, + "org.springframework:spring-web": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot-starter-json" + ] + }, "org.xmlunit:xmlunit-core": { "locked": "2.9.1", "transitive": [ @@ -3021,15 +3025,63 @@ "com.fasterxml.jackson.core:jackson-annotations": { "locked": "2.17.3", "transitive": [ + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, + "com.fasterxml.jackson.core:jackson-core": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom" + ] + }, + "com.fasterxml.jackson.core:jackson-databind": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.module:jackson-module-parameter-names": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, "com.fasterxml.jackson:jackson-bom": { "locked": "2.17.3", "transitive": [ - "com.fasterxml.jackson.core:jackson-annotations" + "com.fasterxml.jackson.core:jackson-annotations", + "com.fasterxml.jackson.core:jackson-core", + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names" ] }, "com.graphql-java:graphql-java": { @@ -3039,7 +3091,8 @@ "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql" ] }, "com.graphql-java:graphql-java-extended-scalars": { @@ -3069,16 +3122,14 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -3094,40 +3145,31 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { @@ -3142,8 +3184,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -3161,7 +3202,8 @@ "io.micrometer:micrometer-observation": { "locked": "1.13.8", "transitive": [ - "org.springframework:spring-context" + "org.springframework:spring-context", + "org.springframework:spring-web" ] }, "io.mockk:mockk": { @@ -3196,7 +3238,8 @@ "locked": "3.6.12", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-platform", + "org.springframework.graphql:spring-graphql" ] }, "jakarta.activation:jakarta.activation-api": { @@ -3289,10 +3332,9 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk", @@ -3412,9 +3454,23 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "org.springframework.boot:spring-boot-starter-json": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework.boot:spring-boot-starter-logging": { "locked": "3.3.6", "transitive": [ @@ -3437,6 +3493,12 @@ "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ @@ -3447,13 +3509,15 @@ "locked": "6.1.15", "transitive": [ "org.springframework:spring-aop", - "org.springframework:spring-context" + "org.springframework:spring-context", + "org.springframework:spring-web" ] }, "org.springframework:spring-context": { "locked": "6.1.15", "transitive": [ - "org.springframework.boot:spring-boot" + "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql" ] }, "org.springframework:spring-core": { @@ -3466,7 +3530,8 @@ "org.springframework:spring-beans", "org.springframework:spring-context", "org.springframework:spring-expression", - "org.springframework:spring-test" + "org.springframework:spring-test", + "org.springframework:spring-web" ] }, "org.springframework:spring-expression": { @@ -3488,6 +3553,12 @@ "org.springframework.boot:spring-boot-test" ] }, + "org.springframework:spring-web": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot-starter-json" + ] + }, "org.xmlunit:xmlunit-core": { "locked": "2.9.1", "transitive": [ @@ -3567,7 +3638,7 @@ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-starter-json" ] }, @@ -3577,8 +3648,8 @@ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -3629,7 +3700,8 @@ "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql" ] }, "com.graphql-java:graphql-java-extended-scalars": { @@ -3659,16 +3731,15 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -3684,40 +3755,32 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { @@ -3732,8 +3795,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -3747,7 +3809,8 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.graphql:spring-graphql" ] }, "io.micrometer:micrometer-commons": { @@ -3823,12 +3886,20 @@ "io.mockk:mockk" ] }, + "io.projectreactor.kotlin:reactor-kotlin-extensions": { + "locked": "1.2.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-reactive" + ] + }, "io.projectreactor:reactor-core": { "locked": "3.6.12", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.jetbrains.kotlinx:kotlinx-coroutines-reactor" + "io.projectreactor.kotlin:reactor-kotlin-extensions", + "org.jetbrains.kotlinx:kotlinx-coroutines-reactor", + "org.springframework.graphql:spring-graphql" ] }, "jakarta.activation:jakarta.activation-api": { @@ -3840,14 +3911,7 @@ "jakarta.annotation:jakarta.annotation-api": { "locked": "2.1.1", "transitive": [ - "org.springframework.boot:spring-boot-starter", - "org.springframework.boot:spring-boot-starter-tomcat" - ] - }, - "jakarta.servlet:jakarta.servlet-api": { - "locked": "6.0.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "org.springframework.boot:spring-boot-starter" ] }, "jakarta.xml.bind:jakarta.xml.bind-api": { @@ -3896,12 +3960,6 @@ "org.springframework.boot:spring-boot-starter-test" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.logging.log4j:log4j-api": { "locked": "2.23.1", "transitive": [ @@ -3916,25 +3974,6 @@ "org.springframework.boot:spring-boot-starter-logging" ] }, - "org.apache.tomcat.embed:tomcat-embed-core": { - "locked": "10.1.33", - "transitive": [ - "org.apache.tomcat.embed:tomcat-embed-websocket", - "org.springframework.boot:spring-boot-starter-tomcat" - ] - }, - "org.apache.tomcat.embed:tomcat-embed-el": { - "locked": "10.1.33", - "transitive": [ - "org.springframework.boot:spring-boot-starter-tomcat" - ] - }, - "org.apache.tomcat.embed:tomcat-embed-websocket": { - "locked": "10.1.33", - "transitive": [ - "org.springframework.boot:spring-boot-starter-tomcat" - ] - }, "org.assertj:assertj-core": { "locked": "3.25.3", "transitive": [ @@ -3966,7 +4005,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -3979,10 +4017,9 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", @@ -4010,6 +4047,7 @@ "locked": "1.8.1", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-reactive", "io.mockk:mockk-dsl-jvm", "io.mockk:mockk-jvm", "org.jetbrains.kotlinx:kotlinx-coroutines-bom", @@ -4181,6 +4219,7 @@ "org.springframework.boot:spring-boot-autoconfigure": { "locked": "3.3.6", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-starter", "org.springframework.boot:spring-boot-test-autoconfigure" ] @@ -4188,17 +4227,21 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", - "org.springframework.boot:spring-boot-starter-test", - "org.springframework.boot:spring-boot-starter-web" + "org.springframework.boot:spring-boot-starter-test" + ] + }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "org.springframework.boot:spring-boot-starter-json": { "locked": "3.3.6", "transitive": [ - "org.springframework.boot:spring-boot-starter-web" + "org.springframework.boot:spring-boot-starter-graphql" ] }, "org.springframework.boot:spring-boot-starter-logging": { @@ -4210,25 +4253,6 @@ "org.springframework.boot:spring-boot-starter-test": { "locked": "3.3.6" }, - "org.springframework.boot:spring-boot-starter-tomcat": { - "locked": "3.3.6", - "transitive": [ - "org.springframework.boot:spring-boot-starter-web" - ] - }, - "org.springframework.boot:spring-boot-starter-web": { - "locked": "3.3.6", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "org.springframework.boot:spring-boot-starter-websocket" - ] - }, - "org.springframework.boot:spring-boot-starter-websocket": { - "locked": "3.3.6", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, "org.springframework.boot:spring-boot-test": { "locked": "3.3.6", "transitive": [ @@ -4242,11 +4266,17 @@ "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ - "org.springframework:spring-context", - "org.springframework:spring-webmvc" + "org.springframework:spring-context" ] }, "org.springframework:spring-beans": { @@ -4254,9 +4284,7 @@ "transitive": [ "org.springframework:spring-aop", "org.springframework:spring-context", - "org.springframework:spring-messaging", - "org.springframework:spring-web", - "org.springframework:spring-webmvc" + "org.springframework:spring-web" ] }, "org.springframework:spring-context": { @@ -4264,7 +4292,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "org.springframework.boot:spring-boot", - "org.springframework:spring-webmvc", + "org.springframework.graphql:spring-graphql", "org.springframework:spring-websocket" ] }, @@ -4278,18 +4306,15 @@ "org.springframework:spring-beans", "org.springframework:spring-context", "org.springframework:spring-expression", - "org.springframework:spring-messaging", "org.springframework:spring-test", "org.springframework:spring-web", - "org.springframework:spring-webmvc", "org.springframework:spring-websocket" ] }, "org.springframework:spring-expression": { "locked": "6.1.15", "transitive": [ - "org.springframework:spring-context", - "org.springframework:spring-webmvc" + "org.springframework:spring-context" ] }, "org.springframework:spring-jcl": { @@ -4298,12 +4323,6 @@ "org.springframework:spring-core" ] }, - "org.springframework:spring-messaging": { - "locked": "6.1.15", - "transitive": [ - "org.springframework.boot:spring-boot-starter-websocket" - ] - }, "org.springframework:spring-test": { "locked": "6.1.15", "transitive": [ @@ -4316,26 +4335,15 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-starter-json", - "org.springframework.boot:spring-boot-starter-web", - "org.springframework:spring-webmvc", "org.springframework:spring-websocket" ] }, - "org.springframework:spring-webmvc": { - "locked": "6.1.15", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "org.springframework.boot:spring-boot-starter-web" - ] - }, "org.springframework:spring-websocket": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "org.springframework.boot:spring-boot-starter-websocket" + "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, "org.xmlunit:xmlunit-core": { diff --git a/graphql-dgs-extended-validation/build.gradle.kts b/graphql-dgs-extended-validation/build.gradle.kts index 3508d43aa..f803deb40 100644 --- a/graphql-dgs-extended-validation/build.gradle.kts +++ b/graphql-dgs-extended-validation/build.gradle.kts @@ -19,5 +19,5 @@ dependencies { api("com.graphql-java:graphql-java-extended-validation") implementation("org.springframework.boot:spring-boot-autoconfigure") - testImplementation(project(":graphql-dgs-spring-boot-starter")) + testImplementation(project(":graphql-dgs-spring-graphql-starter")) } diff --git a/graphql-dgs-extended-validation/dependencies.lock b/graphql-dgs-extended-validation/dependencies.lock index 2eede287b..8a450b614 100644 --- a/graphql-dgs-extended-validation/dependencies.lock +++ b/graphql-dgs-extended-validation/dependencies.lock @@ -1217,7 +1217,7 @@ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-starter-json" ] }, @@ -1227,8 +1227,8 @@ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -1286,7 +1286,8 @@ "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql" ] }, "com.graphql-java:graphql-java-extended-scalars": { @@ -1323,16 +1324,15 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -1348,40 +1348,32 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { @@ -1396,8 +1388,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -1411,7 +1402,8 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.graphql:spring-graphql" ] }, "io.micrometer:micrometer-commons": { @@ -1487,12 +1479,20 @@ "io.mockk:mockk" ] }, + "io.projectreactor.kotlin:reactor-kotlin-extensions": { + "locked": "1.2.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-reactive" + ] + }, "io.projectreactor:reactor-core": { "locked": "3.6.12", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.jetbrains.kotlinx:kotlinx-coroutines-reactor" + "io.projectreactor.kotlin:reactor-kotlin-extensions", + "org.jetbrains.kotlinx:kotlinx-coroutines-reactor", + "org.springframework.graphql:spring-graphql" ] }, "jakarta.activation:jakarta.activation-api": { @@ -1504,8 +1504,7 @@ "jakarta.annotation:jakarta.annotation-api": { "locked": "2.1.1", "transitive": [ - "org.springframework.boot:spring-boot-starter", - "org.springframework.boot:spring-boot-starter-tomcat" + "org.springframework.boot:spring-boot-starter" ] }, "jakarta.el:jakarta.el-api": { @@ -1514,12 +1513,6 @@ "org.glassfish:jakarta.el" ] }, - "jakarta.servlet:jakarta.servlet-api": { - "locked": "6.0.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" - ] - }, "jakarta.validation:jakarta.validation-api": { "locked": "3.0.2", "transitive": [ @@ -1578,12 +1571,6 @@ "org.openjdk.jmh:jmh-core" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.commons:commons-math3": { "locked": "3.6.1", "transitive": [ @@ -1604,25 +1591,6 @@ "org.springframework.boot:spring-boot-starter-logging" ] }, - "org.apache.tomcat.embed:tomcat-embed-core": { - "locked": "10.1.33", - "transitive": [ - "org.apache.tomcat.embed:tomcat-embed-websocket", - "org.springframework.boot:spring-boot-starter-tomcat" - ] - }, - "org.apache.tomcat.embed:tomcat-embed-el": { - "locked": "10.1.33", - "transitive": [ - "org.springframework.boot:spring-boot-starter-tomcat" - ] - }, - "org.apache.tomcat.embed:tomcat-embed-websocket": { - "locked": "10.1.33", - "transitive": [ - "org.springframework.boot:spring-boot-starter-tomcat" - ] - }, "org.assertj:assertj-core": { "locked": "3.25.3", "transitive": [ @@ -1672,7 +1640,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -1685,10 +1652,9 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", @@ -1716,6 +1682,7 @@ "locked": "1.8.1", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-reactive", "io.mockk:mockk-dsl-jvm", "io.mockk:mockk-jvm", "org.jetbrains.kotlinx:kotlinx-coroutines-bom", @@ -1916,6 +1883,7 @@ "org.springframework.boot:spring-boot-autoconfigure": { "locked": "3.3.6", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-starter", "org.springframework.boot:spring-boot-test-autoconfigure" ] @@ -1923,17 +1891,21 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", - "org.springframework.boot:spring-boot-starter-test", - "org.springframework.boot:spring-boot-starter-web" + "org.springframework.boot:spring-boot-starter-test" + ] + }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "org.springframework.boot:spring-boot-starter-json": { "locked": "3.3.6", "transitive": [ - "org.springframework.boot:spring-boot-starter-web" + "org.springframework.boot:spring-boot-starter-graphql" ] }, "org.springframework.boot:spring-boot-starter-logging": { @@ -1945,25 +1917,6 @@ "org.springframework.boot:spring-boot-starter-test": { "locked": "3.3.6" }, - "org.springframework.boot:spring-boot-starter-tomcat": { - "locked": "3.3.6", - "transitive": [ - "org.springframework.boot:spring-boot-starter-web" - ] - }, - "org.springframework.boot:spring-boot-starter-web": { - "locked": "3.3.6", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "org.springframework.boot:spring-boot-starter-websocket" - ] - }, - "org.springframework.boot:spring-boot-starter-websocket": { - "locked": "3.3.6", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, "org.springframework.boot:spring-boot-test": { "locked": "3.3.6", "transitive": [ @@ -1977,11 +1930,17 @@ "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ - "org.springframework:spring-context", - "org.springframework:spring-webmvc" + "org.springframework:spring-context" ] }, "org.springframework:spring-beans": { @@ -1989,9 +1948,7 @@ "transitive": [ "org.springframework:spring-aop", "org.springframework:spring-context", - "org.springframework:spring-messaging", - "org.springframework:spring-web", - "org.springframework:spring-webmvc" + "org.springframework:spring-web" ] }, "org.springframework:spring-context": { @@ -1999,7 +1956,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "org.springframework.boot:spring-boot", - "org.springframework:spring-webmvc", + "org.springframework.graphql:spring-graphql", "org.springframework:spring-websocket" ] }, @@ -2013,18 +1970,15 @@ "org.springframework:spring-beans", "org.springframework:spring-context", "org.springframework:spring-expression", - "org.springframework:spring-messaging", "org.springframework:spring-test", "org.springframework:spring-web", - "org.springframework:spring-webmvc", "org.springframework:spring-websocket" ] }, "org.springframework:spring-expression": { "locked": "6.1.15", "transitive": [ - "org.springframework:spring-context", - "org.springframework:spring-webmvc" + "org.springframework:spring-context" ] }, "org.springframework:spring-jcl": { @@ -2033,12 +1987,6 @@ "org.springframework:spring-core" ] }, - "org.springframework:spring-messaging": { - "locked": "6.1.15", - "transitive": [ - "org.springframework.boot:spring-boot-starter-websocket" - ] - }, "org.springframework:spring-test": { "locked": "6.1.15", "transitive": [ @@ -2051,26 +1999,15 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-starter-json", - "org.springframework.boot:spring-boot-starter-web", - "org.springframework:spring-webmvc", "org.springframework:spring-websocket" ] }, - "org.springframework:spring-webmvc": { - "locked": "6.1.15", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "org.springframework.boot:spring-boot-starter-web" - ] - }, "org.springframework:spring-websocket": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "org.springframework.boot:spring-boot-starter-websocket" + "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, "org.xmlunit:xmlunit-core": { @@ -2833,15 +2770,63 @@ "com.fasterxml.jackson.core:jackson-annotations": { "locked": "2.17.3", "transitive": [ + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, + "com.fasterxml.jackson.core:jackson-core": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom" + ] + }, + "com.fasterxml.jackson.core:jackson-databind": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.module:jackson-module-parameter-names": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, "com.fasterxml.jackson:jackson-bom": { "locked": "2.17.3", "transitive": [ - "com.fasterxml.jackson.core:jackson-annotations" + "com.fasterxml.jackson.core:jackson-annotations", + "com.fasterxml.jackson.core:jackson-core", + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names" ] }, "com.fasterxml:classmate": { @@ -2858,7 +2843,8 @@ "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql" ] }, "com.graphql-java:graphql-java-extended-scalars": { @@ -2895,16 +2881,14 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -2920,40 +2904,31 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { @@ -2968,8 +2943,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -2987,7 +2961,8 @@ "io.micrometer:micrometer-observation": { "locked": "1.13.8", "transitive": [ - "org.springframework:spring-context" + "org.springframework:spring-context", + "org.springframework:spring-web" ] }, "io.mockk:mockk": { @@ -3052,7 +3027,8 @@ "locked": "3.6.12", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-platform", + "org.springframework.graphql:spring-graphql" ] }, "jakarta.activation:jakarta.activation-api": { @@ -3177,10 +3153,9 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", @@ -3312,9 +3287,23 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "org.springframework.boot:spring-boot-starter-json": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework.boot:spring-boot-starter-logging": { "locked": "3.3.6", "transitive": [ @@ -3337,6 +3326,12 @@ "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ @@ -3347,13 +3342,15 @@ "locked": "6.1.15", "transitive": [ "org.springframework:spring-aop", - "org.springframework:spring-context" + "org.springframework:spring-context", + "org.springframework:spring-web" ] }, "org.springframework:spring-context": { "locked": "6.1.15", "transitive": [ - "org.springframework.boot:spring-boot" + "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql" ] }, "org.springframework:spring-core": { @@ -3366,7 +3363,8 @@ "org.springframework:spring-beans", "org.springframework:spring-context", "org.springframework:spring-expression", - "org.springframework:spring-test" + "org.springframework:spring-test", + "org.springframework:spring-web" ] }, "org.springframework:spring-expression": { @@ -3388,6 +3386,12 @@ "org.springframework.boot:spring-boot-test" ] }, + "org.springframework:spring-web": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot-starter-json" + ] + }, "org.xmlunit:xmlunit-core": { "locked": "2.9.1", "transitive": [ @@ -3417,15 +3421,63 @@ "com.fasterxml.jackson.core:jackson-annotations": { "locked": "2.17.3", "transitive": [ + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, + "com.fasterxml.jackson.core:jackson-core": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom" + ] + }, + "com.fasterxml.jackson.core:jackson-databind": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.module:jackson-module-parameter-names": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, "com.fasterxml.jackson:jackson-bom": { "locked": "2.17.3", "transitive": [ - "com.fasterxml.jackson.core:jackson-annotations" + "com.fasterxml.jackson.core:jackson-annotations", + "com.fasterxml.jackson.core:jackson-core", + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names" ] }, "com.fasterxml:classmate": { @@ -3442,7 +3494,8 @@ "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql" ] }, "com.graphql-java:graphql-java-extended-scalars": { @@ -3479,16 +3532,14 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -3504,40 +3555,31 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { @@ -3552,8 +3594,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -3571,7 +3612,8 @@ "io.micrometer:micrometer-observation": { "locked": "1.13.8", "transitive": [ - "org.springframework:spring-context" + "org.springframework:spring-context", + "org.springframework:spring-web" ] }, "io.mockk:mockk": { @@ -3606,7 +3648,8 @@ "locked": "3.6.12", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-platform", + "org.springframework.graphql:spring-graphql" ] }, "jakarta.activation:jakarta.activation-api": { @@ -3729,10 +3772,9 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk", @@ -3852,9 +3894,23 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "org.springframework.boot:spring-boot-starter-json": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework.boot:spring-boot-starter-logging": { "locked": "3.3.6", "transitive": [ @@ -3877,6 +3933,12 @@ "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ @@ -3887,13 +3949,15 @@ "locked": "6.1.15", "transitive": [ "org.springframework:spring-aop", - "org.springframework:spring-context" + "org.springframework:spring-context", + "org.springframework:spring-web" ] }, "org.springframework:spring-context": { "locked": "6.1.15", "transitive": [ - "org.springframework.boot:spring-boot" + "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql" ] }, "org.springframework:spring-core": { @@ -3906,7 +3970,8 @@ "org.springframework:spring-beans", "org.springframework:spring-context", "org.springframework:spring-expression", - "org.springframework:spring-test" + "org.springframework:spring-test", + "org.springframework:spring-web" ] }, "org.springframework:spring-expression": { @@ -3928,6 +3993,12 @@ "org.springframework.boot:spring-boot-test" ] }, + "org.springframework:spring-web": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot-starter-json" + ] + }, "org.xmlunit:xmlunit-core": { "locked": "2.9.1", "transitive": [ @@ -4007,7 +4078,7 @@ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-starter-json" ] }, @@ -4017,8 +4088,8 @@ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -4076,7 +4147,8 @@ "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql" ] }, "com.graphql-java:graphql-java-extended-scalars": { @@ -4113,16 +4185,15 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -4138,40 +4209,32 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { @@ -4186,8 +4249,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -4201,7 +4263,8 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.graphql:spring-graphql" ] }, "io.micrometer:micrometer-commons": { @@ -4277,12 +4340,20 @@ "io.mockk:mockk" ] }, + "io.projectreactor.kotlin:reactor-kotlin-extensions": { + "locked": "1.2.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-reactive" + ] + }, "io.projectreactor:reactor-core": { "locked": "3.6.12", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.jetbrains.kotlinx:kotlinx-coroutines-reactor" + "io.projectreactor.kotlin:reactor-kotlin-extensions", + "org.jetbrains.kotlinx:kotlinx-coroutines-reactor", + "org.springframework.graphql:spring-graphql" ] }, "jakarta.activation:jakarta.activation-api": { @@ -4294,8 +4365,7 @@ "jakarta.annotation:jakarta.annotation-api": { "locked": "2.1.1", "transitive": [ - "org.springframework.boot:spring-boot-starter", - "org.springframework.boot:spring-boot-starter-tomcat" + "org.springframework.boot:spring-boot-starter" ] }, "jakarta.el:jakarta.el-api": { @@ -4304,12 +4374,6 @@ "org.glassfish:jakarta.el" ] }, - "jakarta.servlet:jakarta.servlet-api": { - "locked": "6.0.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" - ] - }, "jakarta.validation:jakarta.validation-api": { "locked": "3.0.2", "transitive": [ @@ -4362,12 +4426,6 @@ "org.springframework.boot:spring-boot-starter-test" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.logging.log4j:log4j-api": { "locked": "2.23.1", "transitive": [ @@ -4382,25 +4440,6 @@ "org.springframework.boot:spring-boot-starter-logging" ] }, - "org.apache.tomcat.embed:tomcat-embed-core": { - "locked": "10.1.33", - "transitive": [ - "org.apache.tomcat.embed:tomcat-embed-websocket", - "org.springframework.boot:spring-boot-starter-tomcat" - ] - }, - "org.apache.tomcat.embed:tomcat-embed-el": { - "locked": "10.1.33", - "transitive": [ - "org.springframework.boot:spring-boot-starter-tomcat" - ] - }, - "org.apache.tomcat.embed:tomcat-embed-websocket": { - "locked": "10.1.33", - "transitive": [ - "org.springframework.boot:spring-boot-starter-tomcat" - ] - }, "org.assertj:assertj-core": { "locked": "3.25.3", "transitive": [ @@ -4450,7 +4489,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -4463,10 +4501,9 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", @@ -4494,6 +4531,7 @@ "locked": "1.8.1", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-reactive", "io.mockk:mockk-dsl-jvm", "io.mockk:mockk-jvm", "org.jetbrains.kotlinx:kotlinx-coroutines-bom", @@ -4665,6 +4703,7 @@ "org.springframework.boot:spring-boot-autoconfigure": { "locked": "3.3.6", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-starter", "org.springframework.boot:spring-boot-test-autoconfigure" ] @@ -4672,17 +4711,21 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", - "org.springframework.boot:spring-boot-starter-test", - "org.springframework.boot:spring-boot-starter-web" + "org.springframework.boot:spring-boot-starter-test" + ] + }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "org.springframework.boot:spring-boot-starter-json": { "locked": "3.3.6", "transitive": [ - "org.springframework.boot:spring-boot-starter-web" + "org.springframework.boot:spring-boot-starter-graphql" ] }, "org.springframework.boot:spring-boot-starter-logging": { @@ -4694,25 +4737,6 @@ "org.springframework.boot:spring-boot-starter-test": { "locked": "3.3.6" }, - "org.springframework.boot:spring-boot-starter-tomcat": { - "locked": "3.3.6", - "transitive": [ - "org.springframework.boot:spring-boot-starter-web" - ] - }, - "org.springframework.boot:spring-boot-starter-web": { - "locked": "3.3.6", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "org.springframework.boot:spring-boot-starter-websocket" - ] - }, - "org.springframework.boot:spring-boot-starter-websocket": { - "locked": "3.3.6", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, "org.springframework.boot:spring-boot-test": { "locked": "3.3.6", "transitive": [ @@ -4726,11 +4750,17 @@ "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ - "org.springframework:spring-context", - "org.springframework:spring-webmvc" + "org.springframework:spring-context" ] }, "org.springframework:spring-beans": { @@ -4738,9 +4768,7 @@ "transitive": [ "org.springframework:spring-aop", "org.springframework:spring-context", - "org.springframework:spring-messaging", - "org.springframework:spring-web", - "org.springframework:spring-webmvc" + "org.springframework:spring-web" ] }, "org.springframework:spring-context": { @@ -4748,7 +4776,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "org.springframework.boot:spring-boot", - "org.springframework:spring-webmvc", + "org.springframework.graphql:spring-graphql", "org.springframework:spring-websocket" ] }, @@ -4762,18 +4790,15 @@ "org.springframework:spring-beans", "org.springframework:spring-context", "org.springframework:spring-expression", - "org.springframework:spring-messaging", "org.springframework:spring-test", "org.springframework:spring-web", - "org.springframework:spring-webmvc", "org.springframework:spring-websocket" ] }, "org.springframework:spring-expression": { "locked": "6.1.15", "transitive": [ - "org.springframework:spring-context", - "org.springframework:spring-webmvc" + "org.springframework:spring-context" ] }, "org.springframework:spring-jcl": { @@ -4782,12 +4807,6 @@ "org.springframework:spring-core" ] }, - "org.springframework:spring-messaging": { - "locked": "6.1.15", - "transitive": [ - "org.springframework.boot:spring-boot-starter-websocket" - ] - }, "org.springframework:spring-test": { "locked": "6.1.15", "transitive": [ @@ -4800,26 +4819,15 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-starter-json", - "org.springframework.boot:spring-boot-starter-web", - "org.springframework:spring-webmvc", "org.springframework:spring-websocket" ] }, - "org.springframework:spring-webmvc": { - "locked": "6.1.15", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "org.springframework.boot:spring-boot-starter-web" - ] - }, "org.springframework:spring-websocket": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "org.springframework.boot:spring-boot-starter-websocket" + "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, "org.xmlunit:xmlunit-core": { diff --git a/graphql-dgs-platform/build.gradle.kts b/graphql-dgs-platform/build.gradle.kts index 251475866..dfbc26680 100644 --- a/graphql-dgs-platform/build.gradle.kts +++ b/graphql-dgs-platform/build.gradle.kts @@ -104,7 +104,9 @@ dependencies { // The following internal modules will be excluded from the BOM val ignoreInternalModules by extra( listOf( - project(":graphql-dgs-example-java"), + project(":graphql-dgs-example-shared"), + project(":graphql-dgs-spring-graphql-example-java"), + project(":graphql-dgs-spring-graphql-example-java-webflux"), project(":graphql-dgs-platform-dependencies") ) ) diff --git a/graphql-dgs-reactive/build.gradle.kts b/graphql-dgs-reactive/build.gradle.kts index 0123b5980..4ea90c406 100644 --- a/graphql-dgs-reactive/build.gradle.kts +++ b/graphql-dgs-reactive/build.gradle.kts @@ -22,6 +22,5 @@ dependencies { implementation("com.fasterxml.jackson.module:jackson-module-kotlin") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core") implementation("io.projectreactor.kotlin:reactor-kotlin-extensions") - testImplementation(project(":graphql-dgs-spring-boot-oss-autoconfigure")) testImplementation("io.projectreactor:reactor-test") } diff --git a/graphql-dgs-reactive/dependencies.lock b/graphql-dgs-reactive/dependencies.lock index f8766c56c..f48304c1c 100644 --- a/graphql-dgs-reactive/dependencies.lock +++ b/graphql-dgs-reactive/dependencies.lock @@ -1543,8 +1543,7 @@ "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson:jackson-bom", - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs" ] }, "com.fasterxml.jackson:jackson-bom": { @@ -1604,9 +1603,7 @@ "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -1621,30 +1618,14 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.vaadin.external.google:android-json": { @@ -1657,8 +1638,7 @@ "locked": "1.1.2", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "io.micrometer:micrometer-commons": { @@ -1816,12 +1796,6 @@ "org.openjdk.jmh:jmh-core" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.commons:commons-math3": { "locked": "3.6.1", "transitive": [ @@ -1873,7 +1847,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -1885,8 +1858,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", "io.mockk:mockk-agent-jvm", @@ -2119,7 +2090,6 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "org.springframework.boot:spring-boot-starter-test" ] }, @@ -2202,9 +2172,7 @@ "org.springframework:spring-web": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs" ] }, "org.xmlunit:xmlunit-core": { @@ -2971,9 +2939,7 @@ "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -2988,30 +2954,14 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.vaadin.external.google:android-json": { @@ -3204,8 +3154,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", "io.mockk:mockk-agent-jvm", @@ -3525,9 +3473,7 @@ "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -3542,30 +3488,14 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.vaadin.external.google:android-json": { @@ -3726,8 +3656,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk", "io.mockk:mockk-agent", @@ -4011,8 +3939,7 @@ "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson:jackson-bom", - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs" ] }, "com.fasterxml.jackson:jackson-bom": { @@ -4072,9 +3999,7 @@ "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -4089,30 +4014,14 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.vaadin.external.google:android-json": { @@ -4125,8 +4034,7 @@ "locked": "1.1.2", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "io.micrometer:micrometer-commons": { @@ -4278,12 +4186,6 @@ "org.springframework.boot:spring-boot-starter-test" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.logging.log4j:log4j-api": { "locked": "2.23.1", "transitive": [ @@ -4329,7 +4231,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -4341,8 +4242,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", "io.mockk:mockk-agent-jvm", @@ -4546,7 +4445,6 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "org.springframework.boot:spring-boot-starter-test" ] }, @@ -4629,9 +4527,7 @@ "org.springframework:spring-web": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs" ] }, "org.xmlunit:xmlunit-core": { diff --git a/graphql-dgs-reactive/src/main/kotlin/com/netflix/graphql/dgs/reactive/internal/DefaultDgsReactiveQueryExecutor.kt b/graphql-dgs-reactive/src/main/kotlin/com/netflix/graphql/dgs/reactive/internal/DefaultDgsReactiveQueryExecutor.kt deleted file mode 100644 index 21d2a1672..000000000 --- a/graphql-dgs-reactive/src/main/kotlin/com/netflix/graphql/dgs/reactive/internal/DefaultDgsReactiveQueryExecutor.kt +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.reactive.internal - -import com.jayway.jsonpath.DocumentContext -import com.jayway.jsonpath.JsonPath -import com.jayway.jsonpath.TypeRef -import com.jayway.jsonpath.spi.mapper.MappingException -import com.netflix.graphql.dgs.exceptions.DgsQueryExecutionDataExtractionException -import com.netflix.graphql.dgs.exceptions.QueryException -import com.netflix.graphql.dgs.internal.BaseDgsQueryExecutor -import com.netflix.graphql.dgs.internal.DefaultDgsQueryExecutor -import com.netflix.graphql.dgs.internal.DgsDataLoaderProvider -import com.netflix.graphql.dgs.internal.DgsSchemaProvider -import com.netflix.graphql.dgs.internal.QueryValueCustomizer -import graphql.ExecutionResult -import graphql.execution.ExecutionIdProvider -import graphql.execution.ExecutionStrategy -import graphql.execution.NonNullableFieldWasNullError -import graphql.execution.instrumentation.Instrumentation -import graphql.execution.preparsed.PreparsedDocumentProvider -import graphql.schema.GraphQLSchema -import org.intellij.lang.annotations.Language -import org.slf4j.Logger -import org.slf4j.LoggerFactory -import org.springframework.http.HttpHeaders -import org.springframework.web.reactive.function.server.ServerRequest -import reactor.core.publisher.Mono -import reactor.kotlin.core.util.function.* -import java.util.* -import java.util.concurrent.atomic.AtomicReference - -class DefaultDgsReactiveQueryExecutor( - defaultSchema: GraphQLSchema, - private val schemaProvider: DgsSchemaProvider, - private val dataLoaderProvider: DgsDataLoaderProvider, - private val contextBuilder: DefaultDgsReactiveGraphQLContextBuilder, - private val instrumentation: Instrumentation?, - private val queryExecutionStrategy: ExecutionStrategy, - private val mutationExecutionStrategy: ExecutionStrategy, - private val idProvider: Optional, - private val reloadIndicator: DefaultDgsQueryExecutor.ReloadSchemaIndicator = DefaultDgsQueryExecutor.ReloadSchemaIndicator { false }, - private val preparsedDocumentProvider: PreparsedDocumentProvider? = null, - private val queryValueCustomizer: QueryValueCustomizer = QueryValueCustomizer { query -> query }, -) : com.netflix.graphql.dgs.reactive.DgsReactiveQueryExecutor { - private val schema = AtomicReference(defaultSchema) - - override fun execute( - @Language("graphql") query: String?, - variables: Map?, - extensions: Map?, - headers: HttpHeaders?, - operationName: String?, - serverHttpRequest: ServerRequest?, - ): Mono = - Mono - .fromCallable { - if (reloadIndicator.reloadSchema()) { - schema.updateAndGet { schemaProvider.schema().graphQLSchema } - } else { - schema.get() - } - }.zipWith(contextBuilder.build(DgsReactiveRequestData(extensions, headers, serverHttpRequest))) - .flatMap { (gqlSchema, dgsContext) -> - Mono - .fromCompletionStage( - BaseDgsQueryExecutor.baseExecute( - query = queryValueCustomizer.apply(query), - variables = variables, - extensions = extensions, - operationName = operationName, - dgsContext = dgsContext, - graphQLSchema = gqlSchema, - dataLoaderProvider = dataLoaderProvider, - instrumentation = instrumentation, - queryExecutionStrategy = queryExecutionStrategy, - mutationExecutionStrategy = mutationExecutionStrategy, - idProvider = idProvider, - preparsedDocumentProvider = preparsedDocumentProvider, - ), - ).doOnEach { result -> - if (result.hasValue()) { - val nullValueError = result.get()?.errors?.find { it is NonNullableFieldWasNullError } - if (nullValueError != null) { - logger.error(nullValueError.message) - } - } - } - } - - override fun executeAndExtractJsonPath( - @Language("graphql") query: String, - jsonPath: String, - variables: Map?, - serverRequest: ServerRequest?, - ): Mono = getJsonResult(query, variables, serverRequest).map { JsonPath.read(it, jsonPath) } - - override fun executeAndGetDocumentContext( - @Language("graphql") query: String, - variables: Map, - ): Mono = getJsonResult(query, variables, null).map(BaseDgsQueryExecutor.parseContext::parse) - - override fun executeAndExtractJsonPathAsObject( - @Language("graphql") query: String, - jsonPath: String, - variables: Map, - clazz: Class, - ): Mono = - getJsonResult(query, variables, null) - .map(BaseDgsQueryExecutor.parseContext::parse) - .map { - try { - it.read(jsonPath, clazz) - } catch (ex: MappingException) { - throw DgsQueryExecutionDataExtractionException(ex, it.jsonString(), jsonPath, clazz) - } - } - - override fun executeAndExtractJsonPathAsObject( - @Language("graphql") query: String, - jsonPath: String, - variables: Map, - typeRef: TypeRef, - ): Mono = - getJsonResult(query, variables, null) - .map(BaseDgsQueryExecutor.parseContext::parse) - .map { - try { - it.read(jsonPath, typeRef) - } catch (ex: MappingException) { - throw DgsQueryExecutionDataExtractionException(ex, it.jsonString(), jsonPath, typeRef) - } - } - - private fun getJsonResult( - @Language("graphql") query: String, - variables: Map?, - serverRequest: ServerRequest?, - ): Mono { - val httpHeaders = serverRequest?.headers()?.asHttpHeaders() - return execute(query, variables, null, httpHeaders, null, serverRequest).map { executionResult -> - if (executionResult.errors.size > 0) { - throw QueryException(executionResult.errors) - } - - BaseDgsQueryExecutor.objectMapper.writeValueAsString(executionResult.toSpecification()) - } - } - - companion object { - private val logger: Logger = LoggerFactory.getLogger(DefaultDgsQueryExecutor::class.java) - } -} diff --git a/graphql-dgs-reactive/src/test/kotlin/com/netflix/graphql/dgs/reactive/DefaultDgsReactiveQueryExecutorTest.kt b/graphql-dgs-reactive/src/test/kotlin/com/netflix/graphql/dgs/reactive/DefaultDgsReactiveQueryExecutorTest.kt deleted file mode 100644 index 2d1f0dcc0..000000000 --- a/graphql-dgs-reactive/src/test/kotlin/com/netflix/graphql/dgs/reactive/DefaultDgsReactiveQueryExecutorTest.kt +++ /dev/null @@ -1,394 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.reactive - -import com.jayway.jsonpath.TypeRef -import com.jayway.jsonpath.spi.mapper.MappingException -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsData -import com.netflix.graphql.dgs.DgsDirective -import com.netflix.graphql.dgs.DgsScalar -import com.netflix.graphql.dgs.exceptions.DgsQueryExecutionDataExtractionException -import com.netflix.graphql.dgs.exceptions.QueryException -import com.netflix.graphql.dgs.internal.DgsDataLoaderProvider -import com.netflix.graphql.dgs.internal.DgsSchemaProvider -import com.netflix.graphql.dgs.internal.method.MethodDataFetcherFactory -import com.netflix.graphql.dgs.reactive.internal.DefaultDgsReactiveGraphQLContextBuilder -import com.netflix.graphql.dgs.reactive.internal.DefaultDgsReactiveQueryExecutor -import graphql.execution.AsyncExecutionStrategy -import graphql.execution.AsyncSerialExecutionStrategy -import graphql.execution.instrumentation.SimplePerformantInstrumentation -import io.mockk.every -import io.mockk.impl.annotations.MockK -import io.mockk.junit5.MockKExtension -import org.assertj.core.api.Assertions.assertThat -import org.dataloader.DataLoaderRegistry -import org.junit.jupiter.api.BeforeEach -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.extension.ExtendWith -import org.springframework.context.ApplicationContext -import reactor.test.StepVerifier -import java.time.LocalDateTime -import java.util.* -import java.util.function.Supplier - -@ExtendWith(MockKExtension::class) -internal class DefaultDgsReactiveQueryExecutorTest { - @MockK - lateinit var applicationContextMock: ApplicationContext - - @MockK - lateinit var dgsDataLoaderProvider: DgsDataLoaderProvider - - lateinit var dgsQueryExecutor: DefaultDgsReactiveQueryExecutor - - @BeforeEach - fun createExecutor() { - val fetcher = - object : Any() { - @DgsData(parentType = "Query", field = "hello") - fun hello(): String = "hi!" - } - - val numbersFetcher = - object : Any() { - @DgsData(parentType = "Query", field = "numbers") - fun hello(): List = listOf(1, 2, 3) - } - - val moviesFetcher = - object : Any() { - @DgsData(parentType = "Query", field = "movies") - fun movies(): List = listOf(Movie("Extraction", LocalDateTime.MIN), Movie("Da 5 Bloods", LocalDateTime.MAX)) - } - - val fetcherWithError = - object : Any() { - @DgsData(parentType = "Query", field = "withError") - fun withError(): String = throw RuntimeException("Broken!") - } - - every { applicationContextMock.getBeansWithAnnotation(DgsComponent::class.java) } returns - mapOf( - Pair( - "helloFetcher", - fetcher, - ), - Pair("numbersFetcher", numbersFetcher), - Pair("moviesFetcher", moviesFetcher), - Pair("withErrorFetcher", fetcherWithError), - ) - every { applicationContextMock.getBeansWithAnnotation(DgsScalar::class.java) } returns - mapOf( - Pair( - "DateTimeScalar", - LocalDateTimeScalar(), - ), - ) - every { applicationContextMock.getBeansWithAnnotation(DgsDirective::class.java) } returns emptyMap() - every { dgsDataLoaderProvider.buildRegistryWithContextSupplier(any>()) } returns DataLoaderRegistry() - - val provider = - DgsSchemaProvider( - applicationContextMock, - federationResolver = Optional.empty(), - dataFetcherExceptionHandler = Optional.empty(), - existingTypeDefinitionRegistry = Optional.empty(), - methodDataFetcherFactory = MethodDataFetcherFactory(listOf()), - ) - - val schema = - provider - .schema( - """ - type Query { - hello: String - numbers: [Int] - movies: [Movie] - withError: String - } - - type Movie { - title: String - releaseDate: DateTime - } - - type Person { - name: String - } - - scalar DateTime - """.trimIndent(), - ).graphQLSchema - - dgsQueryExecutor = - DefaultDgsReactiveQueryExecutor( - defaultSchema = schema, - schemaProvider = provider, - dataLoaderProvider = dgsDataLoaderProvider, - contextBuilder = DefaultDgsReactiveGraphQLContextBuilder(Optional.empty()), - instrumentation = SimplePerformantInstrumentation.INSTANCE, - queryExecutionStrategy = AsyncExecutionStrategy(), - mutationExecutionStrategy = AsyncSerialExecutionStrategy(), - idProvider = Optional.empty(), - ) - } - - @Test - fun extractJsonWithString() { - val helloResult = - dgsQueryExecutor.executeAndExtractJsonPath( - """ - { - hello - } - """.trimIndent(), - "data.hello", - ) - - StepVerifier - .create(helloResult) - .assertNext { - assertThat(it).isEqualTo("hi!") - }.verifyComplete() - } - - @Test - fun extractJsonWithListOfString() { - val numbers = - dgsQueryExecutor.executeAndExtractJsonPath>( - """ - { - numbers - } - """.trimIndent(), - "data.numbers", - ) - - StepVerifier - .create(numbers) - .assertNext { - assertThat(it).isEqualTo(listOf(1, 2, 3)) - }.verifyComplete() - } - - @Test - fun extractJsonWithObjectListAsMap() { - val movies = - dgsQueryExecutor.executeAndExtractJsonPath>>( - """ - { - movies { title releaseDate } - } - """.trimIndent(), - "data.movies", - ) - - StepVerifier - .create(movies) - .assertNext { - assertThat(it[0]["title"]).isEqualTo("Extraction") - assertThat(LocalDateTime.parse(it[0]["releaseDate"] as CharSequence)) - .isEqualTo(LocalDateTime.MIN) - }.verifyComplete() - } - - @Test - fun extractJsonAsObjectAsMap() { - val movie = - dgsQueryExecutor.executeAndExtractJsonPath>( - """ - { - movies { title releaseDate } - } - """.trimIndent(), - "data.movies[0]", - ) - - StepVerifier - .create(movie) - .assertNext { - assertThat(it["title"]).isEqualTo("Extraction") - assertThat(LocalDateTime.parse(it["releaseDate"] as CharSequence)).isEqualTo(LocalDateTime.MIN) - }.verifyComplete() - } - - @Test - fun extractJsonAsObject() { - val movie = - dgsQueryExecutor.executeAndExtractJsonPathAsObject( - """ - { - movies { title releaseDate } - } - """.trimIndent(), - "data.movies[0]", - Movie::class.java, - ) - - StepVerifier - .create(movie) - .assertNext { - assertThat(it.title).isEqualTo("Extraction") - assertThat(it.releaseDate).isEqualTo(LocalDateTime.MIN) - }.verifyComplete() - } - - @Test - fun extractJsonAsObjectWithTypeRef() { - val person = - dgsQueryExecutor.executeAndExtractJsonPathAsObject( - """ - { - movies { title releaseDate } - } - """.trimIndent(), - "data.movies", - object : TypeRef>() {}, - ) - - StepVerifier - .create(person) - .assertNext { - assertThat(it).isInstanceOf(List::class.java) - assertThat(it[0]).isExactlyInstanceOf(Movie::class.java) - }.verifyComplete() - } - - @Test - fun extractError() { - val withError = - dgsQueryExecutor.executeAndExtractJsonPath( - """ - { - withError - } - """.trimIndent(), - "data.withError", - ) - - StepVerifier.create(withError).verifyError(QueryException::class.java) - } - - @Test - fun extractJsonAsObjectError() { - val withError = - dgsQueryExecutor.executeAndExtractJsonPathAsObject( - """ - { - movies { title } - } - """.trimIndent(), - "data.movies[0]", - String::class.java, - ) - - StepVerifier - .create(withError) - .consumeErrorWith { - assertThat(it).isInstanceOf(DgsQueryExecutionDataExtractionException::class.java) - if (it is DgsQueryExecutionDataExtractionException) { - assertThat( - it.message, - ).isEqualTo( - "Error deserializing data from '{\"data\":{\"movies\":[{\"title\":\"Extraction\"},{\"title\":\"Da 5 Bloods\"}]}}' with JsonPath 'data.movies[0]' and target class java.lang.String", - ) - assertThat(it.cause).isInstanceOf(MappingException::class.java) - - assertThat(it.jsonResult).isEqualTo("{\"data\":{\"movies\":[{\"title\":\"Extraction\"},{\"title\":\"Da 5 Bloods\"}]}}") - assertThat(it.jsonPath).isEqualTo("data.movies[0]") - assertThat(it.targetClass).isEqualTo(String::class.java.name) - } - }.verify() - } - - @Test - fun extractJsonAsTypeRefError() { - val withError = - dgsQueryExecutor.executeAndExtractJsonPathAsObject( - """ - { - movies { title } - } - """.trimIndent(), - "data.movies[0]", - object : TypeRef>() {}, - ) - - StepVerifier - .create(withError) - .consumeErrorWith { - assertThat(it).isInstanceOf(DgsQueryExecutionDataExtractionException::class.java) - if (it is DgsQueryExecutionDataExtractionException) { - assertThat( - it.message, - ).isEqualTo( - "Error deserializing data from '{\"data\":{\"movies\":[{\"title\":\"Extraction\"},{\"title\":\"Da 5 Bloods\"}]}}' with JsonPath 'data.movies[0]' and target class java.util.List", - ) - assertThat(it.cause).isInstanceOf(MappingException::class.java) - assertThat(it.jsonResult).isEqualTo("{\"data\":{\"movies\":[{\"title\":\"Extraction\"},{\"title\":\"Da 5 Bloods\"}]}}") - assertThat(it.jsonPath).isEqualTo("data.movies[0]") - assertThat(it.targetClass).isEqualTo("java.util.List") - } - }.verify() - } - - @Test - fun documentContext() { - val context = - dgsQueryExecutor.executeAndGetDocumentContext( - """ - { - movies { title releaseDate } - } - """.trimIndent(), - ) - - StepVerifier - .create(context) - .assertNext { - val movieList = it.read("data.movies", object : TypeRef>() {}) - assertThat(movieList.size).isEqualTo(2) - val movie = it.read("data.movies[0]", Movie::class.java) - assertThat(movie).isNotNull - }.verifyComplete() - } - - @Test - fun documentContextWithTypename() { - val context = - dgsQueryExecutor.executeAndGetDocumentContext( - """ - { - movies { title __typename } - } - """.trimIndent(), - ) - - StepVerifier - .create(context) - .assertNext { - val movie = it.read("data.movies[0]", Movie::class.java) - assertThat(movie).isNotNull - }.verifyComplete() - } - - private data class Movie( - val title: String, - val releaseDate: LocalDateTime?, - ) -} diff --git a/graphql-dgs-reactive/src/test/kotlin/com/netflix/graphql/dgs/reactive/LocalDateTimeScalar.kt b/graphql-dgs-reactive/src/test/kotlin/com/netflix/graphql/dgs/reactive/LocalDateTimeScalar.kt deleted file mode 100644 index 7d8b94645..000000000 --- a/graphql-dgs-reactive/src/test/kotlin/com/netflix/graphql/dgs/reactive/LocalDateTimeScalar.kt +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.reactive - -import com.netflix.graphql.dgs.DgsScalar -import graphql.language.StringValue -import graphql.schema.Coercing -import graphql.schema.CoercingParseLiteralException -import graphql.schema.CoercingSerializeException -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -@DgsScalar(name = "DateTime") -class LocalDateTimeScalar : Coercing { - override fun parseValue(input: Any): LocalDateTime = LocalDateTime.parse(input.toString(), DateTimeFormatter.ISO_DATE_TIME) - - override fun parseLiteral(input: Any): LocalDateTime { - if (input is StringValue) { - return LocalDateTime.parse(input.value, DateTimeFormatter.ISO_DATE_TIME) - } - - throw CoercingParseLiteralException("Value is not a valid ISO date time") - } - - override fun serialize(dataFetcherResult: Any): String { - if (dataFetcherResult is LocalDateTime) { - return dataFetcherResult.format(DateTimeFormatter.ISO_DATE_TIME) - } else { - throw CoercingSerializeException("Not a valid DateTime") - } - } -} diff --git a/graphql-dgs-reactive/src/test/kotlin/com/netflix/graphql/dgs/reactive/ReactiveReturnTypesTest.kt b/graphql-dgs-reactive/src/test/kotlin/com/netflix/graphql/dgs/reactive/ReactiveReturnTypesTest.kt deleted file mode 100644 index d6f9e6c6a..000000000 --- a/graphql-dgs-reactive/src/test/kotlin/com/netflix/graphql/dgs/reactive/ReactiveReturnTypesTest.kt +++ /dev/null @@ -1,336 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.reactive - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsData -import com.netflix.graphql.dgs.DgsDirective -import com.netflix.graphql.dgs.DgsScalar -import com.netflix.graphql.dgs.DgsSubscription -import com.netflix.graphql.dgs.exceptions.QueryException -import com.netflix.graphql.dgs.internal.DgsDataLoaderProvider -import com.netflix.graphql.dgs.internal.DgsSchemaProvider -import com.netflix.graphql.dgs.internal.FlowDataFetcherResultProcessor -import com.netflix.graphql.dgs.internal.FluxDataFetcherResultProcessor -import com.netflix.graphql.dgs.internal.MonoDataFetcherResultProcessor -import com.netflix.graphql.dgs.internal.method.MethodDataFetcherFactory -import com.netflix.graphql.dgs.reactive.internal.DefaultDgsReactiveGraphQLContextBuilder -import com.netflix.graphql.dgs.reactive.internal.DefaultDgsReactiveQueryExecutor -import graphql.ExecutionResult -import graphql.execution.AsyncExecutionStrategy -import graphql.execution.AsyncSerialExecutionStrategy -import graphql.execution.instrumentation.SimplePerformantInstrumentation -import io.mockk.Runs -import io.mockk.every -import io.mockk.impl.annotations.MockK -import io.mockk.junit5.MockKExtension -import io.mockk.just -import io.mockk.verify -import kotlinx.coroutines.flow.Flow -import kotlinx.coroutines.flow.flow -import org.assertj.core.api.Assertions.assertThat -import org.dataloader.DataLoaderRegistry -import org.junit.jupiter.api.Assertions.fail -import org.junit.jupiter.api.BeforeEach -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.extension.ExtendWith -import org.reactivestreams.Publisher -import org.springframework.context.ApplicationContext -import reactor.core.publisher.Flux -import reactor.core.publisher.Mono -import reactor.test.StepVerifier -import reactor.util.context.Context -import reactor.util.context.ContextView -import java.time.Duration -import java.time.LocalDateTime -import java.util.* -import java.util.function.Consumer -import java.util.function.Supplier - -@ExtendWith(MockKExtension::class) -internal class ReactiveReturnTypesTest { - @MockK - lateinit var applicationContextMock: ApplicationContext - - @MockK - lateinit var dgsDataLoaderProvider: DgsDataLoaderProvider - - @MockK - lateinit var stubContextConsumer: Consumer - - lateinit var dgsQueryExecutor: DefaultDgsReactiveQueryExecutor - - @BeforeEach - fun createExecutor() { - val fetcher = - object { - @DgsData(parentType = "Query", field = "hello") - fun hello(): Mono = - Mono.deferContextual { context -> - stubContextConsumer.accept(context) - Mono.just("hi!") - } - } - - val numbersFetcher = - object { - @DgsData(parentType = "Query", field = "numbers") - fun numbers(): Flux = - Flux.deferContextual { context -> - stubContextConsumer.accept(context) - Flux.interval(Duration.ofMillis(1)).map { it.toInt() }.take(5) - } - } - - val moviesFetcher = - object { - @DgsData(parentType = "Query", field = "movies") - fun movies(): Flux = Flux.just(Movie("Extraction", LocalDateTime.MIN), Movie("Da 5 Bloods", LocalDateTime.MAX)) - } - - val fetcherWithError = - object { - @DgsData(parentType = "Query", field = "withError") - fun withError(): Mono = Mono.error { throw RuntimeException("Broken!") } - } - - val fetcherWithFlow = - object { - @DgsData(parentType = "Query", field = "flow") - fun withFlow(): Flow = - flow { - emit("one") - emit("two") - emit("three") - } - } - - val subscriptionFetcherWithFlow = - object { - @DgsSubscription - fun flowSubscription(): Flow = - flow { - emit(0) - emit(2) - emit(4) - emit(6) - } - } - - every { stubContextConsumer.accept(any()) } just Runs - - every { applicationContextMock.getBeansWithAnnotation(DgsComponent::class.java) } returns - mapOf( - "helloFetcher" to fetcher, - "numbersFetcher" to numbersFetcher, - "moviesFetcher" to moviesFetcher, - "withErrorFetcher" to fetcherWithError, - "flowFetcher" to fetcherWithFlow, - "flowSubscription" to subscriptionFetcherWithFlow, - ) - every { applicationContextMock.getBeansWithAnnotation(DgsScalar::class.java) } returns - mapOf( - "DateTimeScalar" to LocalDateTimeScalar(), - ) - every { applicationContextMock.getBeansWithAnnotation(DgsDirective::class.java) } returns emptyMap() - every { dgsDataLoaderProvider.buildRegistryWithContextSupplier(any>()) } returns DataLoaderRegistry() - - val provider = - DgsSchemaProvider( - applicationContextMock, - federationResolver = Optional.empty(), - existingTypeDefinitionRegistry = Optional.empty(), - schemaLocations = listOf(DgsSchemaProvider.DEFAULT_SCHEMA_LOCATION), - dataFetcherResultProcessors = - listOf( - MonoDataFetcherResultProcessor(), - FluxDataFetcherResultProcessor(), - FlowDataFetcherResultProcessor(), - ), - methodDataFetcherFactory = MethodDataFetcherFactory(listOf()), - ) - - val schema = - provider - .schema( - """ - type Query { - hello: String - numbers: [Int] - movies: [Movie] - withError: String - flow: [String] - } - - type Subscription { - flowSubscription: Int - } - - type Movie { - title: String - releaseDate: DateTime - } - - type Person { - name: String - } - - scalar DateTime - """.trimIndent(), - ).graphQLSchema - - dgsQueryExecutor = - DefaultDgsReactiveQueryExecutor( - defaultSchema = schema, - schemaProvider = provider, - dataLoaderProvider = dgsDataLoaderProvider, - contextBuilder = DefaultDgsReactiveGraphQLContextBuilder(Optional.empty()), - instrumentation = SimplePerformantInstrumentation.INSTANCE, - queryExecutionStrategy = AsyncExecutionStrategy(), - mutationExecutionStrategy = AsyncSerialExecutionStrategy(), - idProvider = Optional.empty(), - ) - } - - @Test - fun extractJsonWithMonoString() { - val helloResult = - dgsQueryExecutor - .executeAndExtractJsonPath( - """ - { - hello - } - """.trimIndent(), - "data.hello", - ).contextWrite(dummyContext()) - - StepVerifier - .create(helloResult) - .assertNext { - assertThat(it).isEqualTo("hi!") - }.verifyComplete() - verify { stubContextConsumer.accept(match(comparingDummyContext())) } - } - - @Test - fun `extract json with flow`() { - val flowResult = - dgsQueryExecutor - .executeAndExtractJsonPath>( - """ - { - flow - } - """.trimIndent(), - "data.flow", - ).contextWrite(dummyContext()) - - val step = StepVerifier.create(flowResult) - step - .assertNext { - assertThat(it).isEqualTo(listOf("one", "two", "three")) - }.verifyComplete() - } - - @Test - fun `Execute subscription query against Flow datafetcher`() { - val executionResult = - dgsQueryExecutor.execute("subscription { flowSubscription }").block() - ?: fail("ExecutionResult was null") - val publisher = executionResult.getData>() - val flux = - Flux.from(publisher).map { result -> - result.getData>()["flowSubscription"] ?: fail("Got null value: $result") - } - - StepVerifier - .create(flux) - .expectNext(0, 2, 4, 6) - .expectComplete() - .verify() - } - - @Test - fun extractJsonWithFlux() { - val numbers = - dgsQueryExecutor - .executeAndExtractJsonPath>( - """ - { - numbers - } - """.trimIndent(), - "data.numbers", - ).contextWrite(dummyContext()) - - val step = StepVerifier.create(numbers) - step - .assertNext { - assertThat(it).isEqualTo(listOf(0, 1, 2, 3, 4)) - }.verifyComplete() - verify { stubContextConsumer.accept(match(comparingDummyContext())) } - } - - @Test - fun extractJsonWithMonoOfObjects() { - val movies = - dgsQueryExecutor.executeAndExtractJsonPath>>( - """ - { - movies { title releaseDate } - } - """.trimIndent(), - "data.movies", - ) - - StepVerifier - .create(movies) - .assertNext { - assertThat(it[0]["title"]).isEqualTo("Extraction") - assertThat(LocalDateTime.parse(it[0]["releaseDate"] as CharSequence)) - .isEqualTo(LocalDateTime.MIN) - }.verifyComplete() - } - - @Test - fun extractError() { - val withError = - dgsQueryExecutor.executeAndExtractJsonPath( - """ - { - withError - } - """.trimIndent(), - "data.withError", - ) - - StepVerifier.create(withError).verifyError(QueryException::class.java) - } - - private fun dummyContext() = Context.of("some-key", "some context value") - - private fun comparingDummyContext() = - { context: ContextView -> - context.size() == 1 && context.get("some-key") == "some context value" - } - - private data class Movie( - val title: String, - val releaseDate: LocalDateTime?, - ) -} diff --git a/graphql-dgs-spring-boot-micrometer/build.gradle.kts b/graphql-dgs-spring-boot-micrometer/build.gradle.kts index 027c82026..35de76bdf 100644 --- a/graphql-dgs-spring-boot-micrometer/build.gradle.kts +++ b/graphql-dgs-spring-boot-micrometer/build.gradle.kts @@ -7,11 +7,10 @@ dependencies { implementation("com.github.ben-manes.caffeine:caffeine") implementation("org.springframework:spring-context-support") - compileOnly(project(":graphql-dgs-spring-boot-starter")) compileOnly("org.springframework.boot:spring-boot-actuator-autoconfigure") compileOnly("org.springframework.boot:spring-boot-starter-web") - testImplementation(project(":graphql-dgs-spring-boot-starter")) + testImplementation(project(":graphql-dgs-spring-graphql-starter")) testImplementation("org.springframework.boot:spring-boot-actuator-autoconfigure") testImplementation("org.springframework.boot:spring-boot-starter-web") } diff --git a/graphql-dgs-spring-boot-micrometer/dependencies.lock b/graphql-dgs-spring-boot-micrometer/dependencies.lock index 7b0dad52b..6da63954f 100644 --- a/graphql-dgs-spring-boot-micrometer/dependencies.lock +++ b/graphql-dgs-spring-boot-micrometer/dependencies.lock @@ -99,9 +99,7 @@ "transitive": [ "com.fasterxml.jackson.core:jackson-databind", "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", - "com.fasterxml.jackson:jackson-bom", - "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-subscription-types" + "com.fasterxml.jackson:jackson-bom" ] }, "com.fasterxml.jackson.core:jackson-core": { @@ -171,7 +169,6 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -187,24 +184,13 @@ "locked": "2.9.0", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-client": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -218,58 +204,15 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.spectator:spectator-api": { @@ -296,13 +239,6 @@ "org.springframework:spring-web" ] }, - "io.projectreactor:reactor-core": { - "locked": "3.6.12", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "jakarta.annotation:jakarta.annotation-api": { "locked": "2.1.1", "transitive": [ @@ -353,13 +289,7 @@ "locked": "2.0.21", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -372,8 +302,7 @@ "org.reactivestreams:reactive-streams": { "locked": "1.0.4", "transitive": [ - "com.graphql-java:graphql-java", - "io.projectreactor:reactor-core" + "com.graphql-java:graphql-java" ] }, "org.slf4j:jul-to-slf4j": { @@ -538,9 +467,7 @@ "transitive": [ "com.fasterxml.jackson.core:jackson-databind", "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", - "com.fasterxml.jackson:jackson-bom", - "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-subscription-types" + "com.fasterxml.jackson:jackson-bom" ] }, "com.fasterxml.jackson.core:jackson-core": { @@ -595,113 +522,6 @@ "com.fasterxml.jackson.module:jackson-module-parameter-names" ] }, - "com.graphql-java:graphql-java": { - "locked": "22.3", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" - ] - }, - "com.graphql-java:java-dataloader": { - "locked": "3.3.0", - "transitive": [ - "com.graphql-java:graphql-java", - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.jayway.jsonpath:json-path": { - "locked": "2.9.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-client": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-mocking": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-platform": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-error-types": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" - ] - }, "io.micrometer:micrometer-commons": { "locked": "1.13.8", "transitive": [ @@ -715,13 +535,6 @@ "org.springframework:spring-web" ] }, - "io.projectreactor:reactor-core": { - "locked": "3.6.12", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "jakarta.annotation:jakarta.annotation-api": { "locked": "2.1.1", "transitive": [ @@ -732,14 +545,12 @@ "org.apache.logging.log4j:log4j-api": { "locked": "2.23.1", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", "org.apache.logging.log4j:log4j-to-slf4j" ] }, "org.apache.logging.log4j:log4j-to-slf4j": { "locked": "2.23.1", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", "org.springframework.boot:spring-boot-starter-logging" ] }, @@ -762,27 +573,6 @@ "org.springframework.boot:spring-boot-starter-tomcat" ] }, - "org.jetbrains.kotlin:kotlin-stdlib": { - "locked": "2.0.21", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" - ] - }, - "org.reactivestreams:reactive-streams": { - "locked": "1.0.4", - "transitive": [ - "com.graphql-java:graphql-java", - "io.projectreactor:reactor-core" - ] - }, "org.slf4j:jul-to-slf4j": { "locked": "2.0.16", "transitive": [ @@ -793,7 +583,6 @@ "locked": "2.0.16", "transitive": [ "ch.qos.logback:logback-classic", - "com.graphql-java:java-dataloader", "org.apache.logging.log4j:log4j-to-slf4j", "org.slf4j:jul-to-slf4j" ] @@ -1218,9 +1007,7 @@ "transitive": [ "com.fasterxml.jackson.core:jackson-databind", "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", - "com.fasterxml.jackson:jackson-bom", - "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-subscription-types" + "com.fasterxml.jackson:jackson-bom" ] }, "com.fasterxml.jackson.core:jackson-core": { @@ -1290,7 +1077,6 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -1306,24 +1092,13 @@ "locked": "2.9.0", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-client": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -1337,58 +1112,15 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.spectator:spectator-api": { @@ -1415,13 +1147,6 @@ "org.springframework:spring-web" ] }, - "io.projectreactor:reactor-core": { - "locked": "3.6.12", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "jakarta.annotation:jakarta.annotation-api": { "locked": "2.1.1", "transitive": [ @@ -1484,13 +1209,7 @@ "locked": "2.0.21", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -1537,8 +1256,7 @@ "org.reactivestreams:reactive-streams": { "locked": "1.0.4", "transitive": [ - "com.graphql-java:graphql-java", - "io.projectreactor:reactor-core" + "com.graphql-java:graphql-java" ] }, "org.slf4j:jul-to-slf4j": { @@ -1703,9 +1421,7 @@ "transitive": [ "com.fasterxml.jackson.core:jackson-databind", "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", - "com.fasterxml.jackson:jackson-bom", - "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-subscription-types" + "com.fasterxml.jackson:jackson-bom" ] }, "com.fasterxml.jackson.core:jackson-core": { @@ -1760,113 +1476,6 @@ "com.fasterxml.jackson.module:jackson-module-parameter-names" ] }, - "com.graphql-java:graphql-java": { - "locked": "22.3", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" - ] - }, - "com.graphql-java:java-dataloader": { - "locked": "3.3.0", - "transitive": [ - "com.graphql-java:graphql-java", - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.jayway.jsonpath:json-path": { - "locked": "2.9.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-client": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-mocking": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-platform": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-error-types": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" - ] - }, "io.micrometer:micrometer-commons": { "locked": "1.13.8", "transitive": [ @@ -1880,13 +1489,6 @@ "org.springframework:spring-web" ] }, - "io.projectreactor:reactor-core": { - "locked": "3.6.12", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "jakarta.annotation:jakarta.annotation-api": { "locked": "2.1.1", "transitive": [ @@ -1897,14 +1499,12 @@ "org.apache.logging.log4j:log4j-api": { "locked": "2.23.1", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", "org.apache.logging.log4j:log4j-to-slf4j" ] }, "org.apache.logging.log4j:log4j-to-slf4j": { "locked": "2.23.1", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", "org.springframework.boot:spring-boot-starter-logging" ] }, @@ -1927,27 +1527,6 @@ "org.springframework.boot:spring-boot-starter-tomcat" ] }, - "org.jetbrains.kotlin:kotlin-stdlib": { - "locked": "2.0.21", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" - ] - }, - "org.reactivestreams:reactive-streams": { - "locked": "1.0.4", - "transitive": [ - "com.graphql-java:graphql-java", - "io.projectreactor:reactor-core" - ] - }, "org.slf4j:jul-to-slf4j": { "locked": "2.0.16", "transitive": [ @@ -1958,7 +1537,6 @@ "locked": "2.0.16", "transitive": [ "ch.qos.logback:logback-classic", - "com.graphql-java:java-dataloader", "org.apache.logging.log4j:log4j-to-slf4j", "org.slf4j:jul-to-slf4j" ] @@ -2356,7 +1934,7 @@ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-actuator-autoconfigure", "org.springframework.boot:spring-boot-starter-json" ] @@ -2367,8 +1945,8 @@ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -2427,7 +2005,8 @@ "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql" ] }, "com.graphql-java:java-dataloader": { @@ -2451,16 +2030,15 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -2476,40 +2054,32 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { @@ -2524,8 +2094,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.spectator:spectator-api": { @@ -2545,7 +2114,8 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.graphql:spring-graphql" ] }, "io.micrometer:micrometer-commons": { @@ -2626,12 +2196,20 @@ "io.mockk:mockk" ] }, + "io.projectreactor.kotlin:reactor-kotlin-extensions": { + "locked": "1.2.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-reactive" + ] + }, "io.projectreactor:reactor-core": { "locked": "3.6.12", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.jetbrains.kotlinx:kotlinx-coroutines-reactor" + "io.projectreactor.kotlin:reactor-kotlin-extensions", + "org.jetbrains.kotlinx:kotlinx-coroutines-reactor", + "org.springframework.graphql:spring-graphql" ] }, "jakarta.activation:jakarta.activation-api": { @@ -2647,12 +2225,6 @@ "org.springframework.boot:spring-boot-starter-tomcat" ] }, - "jakarta.servlet:jakarta.servlet-api": { - "locked": "6.0.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" - ] - }, "jakarta.xml.bind:jakarta.xml.bind-api": { "locked": "4.0.2", "transitive": [ @@ -2705,12 +2277,6 @@ "org.openjdk.jmh:jmh-core" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.commons:commons-math3": { "locked": "3.6.1", "transitive": [ @@ -2793,7 +2359,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -2806,10 +2371,9 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", @@ -2837,6 +2401,7 @@ "locked": "1.8.1", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-reactive", "io.mockk:mockk-dsl-jvm", "io.mockk:mockk-jvm", "org.jetbrains.kotlinx:kotlinx-coroutines-bom", @@ -3055,6 +2620,7 @@ "org.springframework.boot:spring-boot-autoconfigure": { "locked": "3.3.6", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-actuator-autoconfigure", "org.springframework.boot:spring-boot-starter", "org.springframework.boot:spring-boot-test-autoconfigure" @@ -3063,16 +2629,22 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test", "org.springframework.boot:spring-boot-starter-web" ] }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, "org.springframework.boot:spring-boot-starter-json": { "locked": "3.3.6", "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-web" ] }, @@ -3092,17 +2664,7 @@ ] }, "org.springframework.boot:spring-boot-starter-web": { - "locked": "3.3.6", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "org.springframework.boot:spring-boot-starter-websocket" - ] - }, - "org.springframework.boot:spring-boot-starter-websocket": { - "locked": "3.3.6", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] + "locked": "3.3.6" }, "org.springframework.boot:spring-boot-test": { "locked": "3.3.6", @@ -3117,6 +2679,13 @@ "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ @@ -3130,7 +2699,6 @@ "org.springframework:spring-aop", "org.springframework:spring-context", "org.springframework:spring-context-support", - "org.springframework:spring-messaging", "org.springframework:spring-web", "org.springframework:spring-webmvc" ] @@ -3140,6 +2708,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql", "org.springframework:spring-context-support", "org.springframework:spring-webmvc", "org.springframework:spring-websocket" @@ -3159,7 +2728,6 @@ "org.springframework:spring-context", "org.springframework:spring-context-support", "org.springframework:spring-expression", - "org.springframework:spring-messaging", "org.springframework:spring-test", "org.springframework:spring-web", "org.springframework:spring-webmvc", @@ -3179,12 +2747,6 @@ "org.springframework:spring-core" ] }, - "org.springframework:spring-messaging": { - "locked": "6.1.15", - "transitive": [ - "org.springframework.boot:spring-boot-starter-websocket" - ] - }, "org.springframework:spring-test": { "locked": "6.1.15", "transitive": [ @@ -3197,8 +2759,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-web", "org.springframework:spring-webmvc", @@ -3208,15 +2769,13 @@ "org.springframework:spring-webmvc": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", "org.springframework.boot:spring-boot-starter-web" ] }, "org.springframework:spring-websocket": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "org.springframework.boot:spring-boot-starter-websocket" + "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, "org.xmlunit:xmlunit-core": { @@ -4037,7 +3596,8 @@ "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql" ] }, "com.graphql-java:java-dataloader": { @@ -4061,16 +3621,14 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -4086,40 +3644,31 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { @@ -4134,8 +3683,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.spectator:spectator-api": { @@ -4230,7 +3778,8 @@ "locked": "3.6.12", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-platform", + "org.springframework.graphql:spring-graphql" ] }, "jakarta.activation:jakarta.activation-api": { @@ -4351,10 +3900,9 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", @@ -4498,14 +4046,22 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test", "org.springframework.boot:spring-boot-starter-web" ] }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, "org.springframework.boot:spring-boot-starter-json": { "locked": "3.3.6", "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-web" ] }, @@ -4540,6 +4096,12 @@ "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ @@ -4561,6 +4123,7 @@ "locked": "6.1.15", "transitive": [ "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql", "org.springframework:spring-context-support", "org.springframework:spring-webmvc" ] @@ -4722,7 +4285,8 @@ "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql" ] }, "com.graphql-java:java-dataloader": { @@ -4746,16 +4310,14 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -4771,40 +4333,31 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { @@ -4819,8 +4372,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.spectator:spectator-api": { @@ -4885,7 +4437,8 @@ "locked": "3.6.12", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-platform", + "org.springframework.graphql:spring-graphql" ] }, "jakarta.activation:jakarta.activation-api": { @@ -5004,10 +4557,9 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk", @@ -5139,14 +4691,22 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test", "org.springframework.boot:spring-boot-starter-web" ] }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, "org.springframework.boot:spring-boot-starter-json": { "locked": "3.3.6", "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-web" ] }, @@ -5181,6 +4741,12 @@ "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ @@ -5202,6 +4768,7 @@ "locked": "6.1.15", "transitive": [ "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql", "org.springframework:spring-context-support", "org.springframework:spring-webmvc" ] @@ -5339,7 +4906,7 @@ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-actuator-autoconfigure", "org.springframework.boot:spring-boot-starter-json" ] @@ -5350,8 +4917,8 @@ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -5410,7 +4977,8 @@ "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-error-types" + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql" ] }, "com.graphql-java:java-dataloader": { @@ -5434,16 +5002,15 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -5459,40 +5026,32 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-reactive": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { @@ -5507,8 +5066,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.spectator:spectator-api": { @@ -5528,7 +5086,8 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.graphql:spring-graphql" ] }, "io.micrometer:micrometer-commons": { @@ -5609,12 +5168,20 @@ "io.mockk:mockk" ] }, + "io.projectreactor.kotlin:reactor-kotlin-extensions": { + "locked": "1.2.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-reactive" + ] + }, "io.projectreactor:reactor-core": { "locked": "3.6.12", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.jetbrains.kotlinx:kotlinx-coroutines-reactor" + "io.projectreactor.kotlin:reactor-kotlin-extensions", + "org.jetbrains.kotlinx:kotlinx-coroutines-reactor", + "org.springframework.graphql:spring-graphql" ] }, "jakarta.activation:jakarta.activation-api": { @@ -5630,12 +5197,6 @@ "org.springframework.boot:spring-boot-starter-tomcat" ] }, - "jakarta.servlet:jakarta.servlet-api": { - "locked": "6.0.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure" - ] - }, "jakarta.xml.bind:jakarta.xml.bind-api": { "locked": "4.0.2", "transitive": [ @@ -5682,12 +5243,6 @@ "org.springframework.boot:spring-boot-starter-test" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.logging.log4j:log4j-api": { "locked": "2.23.1", "transitive": [ @@ -5764,7 +5319,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -5777,10 +5331,9 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", @@ -5808,6 +5361,7 @@ "locked": "1.8.1", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-reactive", "io.mockk:mockk-dsl-jvm", "io.mockk:mockk-jvm", "org.jetbrains.kotlinx:kotlinx-coroutines-bom", @@ -5997,6 +5551,7 @@ "org.springframework.boot:spring-boot-autoconfigure": { "locked": "3.3.6", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-actuator-autoconfigure", "org.springframework.boot:spring-boot-starter", "org.springframework.boot:spring-boot-test-autoconfigure" @@ -6005,16 +5560,22 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test", "org.springframework.boot:spring-boot-starter-web" ] }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, "org.springframework.boot:spring-boot-starter-json": { "locked": "3.3.6", "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-web" ] }, @@ -6034,17 +5595,7 @@ ] }, "org.springframework.boot:spring-boot-starter-web": { - "locked": "3.3.6", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter", - "org.springframework.boot:spring-boot-starter-websocket" - ] - }, - "org.springframework.boot:spring-boot-starter-websocket": { - "locked": "3.3.6", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" - ] + "locked": "3.3.6" }, "org.springframework.boot:spring-boot-test": { "locked": "3.3.6", @@ -6059,6 +5610,13 @@ "org.springframework.boot:spring-boot-starter-test" ] }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, "org.springframework:spring-aop": { "locked": "6.1.15", "transitive": [ @@ -6072,7 +5630,6 @@ "org.springframework:spring-aop", "org.springframework:spring-context", "org.springframework:spring-context-support", - "org.springframework:spring-messaging", "org.springframework:spring-web", "org.springframework:spring-webmvc" ] @@ -6082,6 +5639,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql", "org.springframework:spring-context-support", "org.springframework:spring-webmvc", "org.springframework:spring-websocket" @@ -6101,7 +5659,6 @@ "org.springframework:spring-context", "org.springframework:spring-context-support", "org.springframework:spring-expression", - "org.springframework:spring-messaging", "org.springframework:spring-test", "org.springframework:spring-web", "org.springframework:spring-webmvc", @@ -6121,12 +5678,6 @@ "org.springframework:spring-core" ] }, - "org.springframework:spring-messaging": { - "locked": "6.1.15", - "transitive": [ - "org.springframework.boot:spring-boot-starter-websocket" - ] - }, "org.springframework:spring-test": { "locked": "6.1.15", "transitive": [ @@ -6139,8 +5690,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-web", "org.springframework:spring-webmvc", @@ -6150,15 +5700,13 @@ "org.springframework:spring-webmvc": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure", "org.springframework.boot:spring-boot-starter-web" ] }, "org.springframework:spring-websocket": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "org.springframework.boot:spring-boot-starter-websocket" + "com.netflix.graphql.dgs:graphql-dgs-subscription-types" ] }, "org.xmlunit:xmlunit-core": { diff --git a/graphql-dgs-spring-boot-micrometer/src/main/kotlin/com/netflix/graphql/dgs/metrics/micrometer/DgsGraphQLMetricsInstrumentation.kt b/graphql-dgs-spring-boot-micrometer/src/main/kotlin/com/netflix/graphql/dgs/metrics/micrometer/DgsGraphQLMetricsInstrumentation.kt index 8b7c9582d..971343a1c 100644 --- a/graphql-dgs-spring-boot-micrometer/src/main/kotlin/com/netflix/graphql/dgs/metrics/micrometer/DgsGraphQLMetricsInstrumentation.kt +++ b/graphql-dgs-spring-boot-micrometer/src/main/kotlin/com/netflix/graphql/dgs/metrics/micrometer/DgsGraphQLMetricsInstrumentation.kt @@ -352,7 +352,7 @@ class DgsGraphQLMetricsInstrumentation( val errorDetail = errorDetailExtension(error) when (error) { is ValidationError -> { - errorPath = error.path.orEmpty() + errorPath = error.queryPath.orEmpty() errorType = ErrorType.BAD_REQUEST.name } is InvalidSyntaxError -> { diff --git a/graphql-dgs-spring-boot-micrometer/src/test/kotlin/com/netflix/graphql/dgs/metrics/micrometer/DgsGraphQLMicrometerAutoConfigurationTest.kt b/graphql-dgs-spring-boot-micrometer/src/test/kotlin/com/netflix/graphql/dgs/metrics/micrometer/DgsGraphQLMicrometerAutoConfigurationTest.kt index e650683f4..30c68c11f 100644 --- a/graphql-dgs-spring-boot-micrometer/src/test/kotlin/com/netflix/graphql/dgs/metrics/micrometer/DgsGraphQLMicrometerAutoConfigurationTest.kt +++ b/graphql-dgs-spring-boot-micrometer/src/test/kotlin/com/netflix/graphql/dgs/metrics/micrometer/DgsGraphQLMicrometerAutoConfigurationTest.kt @@ -18,11 +18,11 @@ package com.netflix.graphql.dgs.metrics.micrometer import com.netflix.graphql.dgs.DgsComponent import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration import com.netflix.graphql.dgs.metrics.micrometer.dataloader.DgsDataLoaderInstrumentationProvider import com.netflix.graphql.dgs.metrics.micrometer.tagging.DgsGraphQLMetricsTagsProvider import com.netflix.graphql.dgs.metrics.micrometer.tagging.SimpleGqlOutcomeTagCustomizer import com.netflix.graphql.dgs.metrics.micrometer.utils.QuerySignatureRepository +import com.netflix.graphql.dgs.springgraphql.autoconfig.DgsSpringGraphQLAutoConfiguration import graphql.schema.idl.SchemaParser import graphql.schema.idl.TypeDefinitionRegistry import org.assertj.core.api.Assertions.assertThat @@ -30,6 +30,7 @@ import org.junit.jupiter.api.Test import org.springframework.boot.actuate.autoconfigure.metrics.CompositeMeterRegistryAutoConfiguration import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration import org.springframework.boot.autoconfigure.AutoConfigurations +import org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration import org.springframework.boot.context.annotation.UserConfigurations import org.springframework.boot.test.context.TestConfiguration import org.springframework.boot.test.context.runner.ApplicationContextRunner @@ -40,10 +41,11 @@ internal class DgsGraphQLMicrometerAutoConfigurationTest { ApplicationContextRunner() .withConfiguration( AutoConfigurations.of( + DgsSpringGraphQLAutoConfiguration::class.java, + GraphQlAutoConfiguration::class.java, CompositeMeterRegistryAutoConfiguration::class.java, MetricsAutoConfiguration::class.java, DgsGraphQLMicrometerAutoConfiguration::class.java, - DgsAutoConfiguration::class.java, ), ).withConfiguration( UserConfigurations.of(LocalTestConfiguration::class.java), diff --git a/graphql-dgs-spring-boot-micrometer/src/test/kotlin/com/netflix/graphql/dgs/metrics/micrometer/MicrometerServletSmokeTest.kt b/graphql-dgs-spring-boot-micrometer/src/test/kotlin/com/netflix/graphql/dgs/metrics/micrometer/MicrometerServletSmokeTest.kt index 762067662..45051e58d 100644 --- a/graphql-dgs-spring-boot-micrometer/src/test/kotlin/com/netflix/graphql/dgs/metrics/micrometer/MicrometerServletSmokeTest.kt +++ b/graphql-dgs-spring-boot-micrometer/src/test/kotlin/com/netflix/graphql/dgs/metrics/micrometer/MicrometerServletSmokeTest.kt @@ -53,7 +53,6 @@ import org.dataloader.BatchLoader import org.dataloader.DataLoaderRegistry import org.dataloader.MappedBatchLoader import org.junit.jupiter.api.BeforeEach -import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test import org.junit.jupiter.api.parallel.Execution import org.junit.jupiter.api.parallel.ExecutionMode @@ -251,101 +250,6 @@ class MicrometerServletSmokeTest { ) } - @Test - @Disabled - fun `Metrics for a successful request with data loaders`() { - mvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content( - """{"query": - | "{transform(input: [\"A madam in a racecar.\", \"A man, a plan, a canal - Panama\" ]){ index value upperCased reversed } }" } - """.trimMargin(), - ), - ).andExpect(status().isOk) - .andExpect( - content().json( - """ - |{ - | "data":{ - | "transform":[ - | { - | "index":0, - | "value":"A madam in a racecar.", - | "upperCased":"A MADAM IN A RACECAR.", - | "reversed":".racecar a ni madam A" - | }, - | { - | "index":1, - | "value":"A man, a plan, a canal - Panama", - | "upperCased":"A MAN, A PLAN, A CANAL - PANAMA", - | "reversed":"amanaP - lanac a ,nalp a ,nam A" - | } - | ] - | } - |} - """.trimMargin(), - false, - ), - ) - - val meters = fetchMeters() - - assertThat(meters).containsOnlyKeys("gql.dataLoader", "gql.query", "gql.resolver") - - assertThat(meters["gql.dataLoader"]).isNotNull.hasSize(2) - assertThat(meters["gql.dataLoader"]?.map { it.id.tags }) - .containsAll( - listOf( - Tags.of("gql.loaderBatchSize", "2").and("gql.loaderName", "reverser").toList(), - Tags.of("gql.loaderBatchSize", "2").and("gql.loaderName", "upperCaseLoader").toList(), - ), - ) - - assertThat(meters["gql.query"]).isNotNull.hasSize(1) - assertThat(meters["gql.query"]?.first()?.id?.tags) - .containsAll( - Tags - .of("execution-tag", "foo") - .and("contextual-tag", "foo") - .and("outcome", "success") - .and("gql.operation", "QUERY") - .and("gql.operation.name", "anonymous") - .and("gql.query.complexity", "10") - .and("gql.query.sig.hash", MOCKED_QUERY_SIGNATURE.hash), - ) - - assertThat(meters["gql.resolver"]?.first()?.id?.tags) - .containsAll( - Tags - .of("gql.field", "Query.transform") - .and("field-fetch-tag", "foo") - .and("contextual-tag", "foo") - .and("outcome", "success") - .and("gql.operation", "QUERY") - .and("gql.operation.name", "anonymous") - .and("gql.query.complexity", "10") - .and("gql.query.sig.hash", MOCKED_QUERY_SIGNATURE.hash), - ) - - assertThat(meters["gql.dataLoader"]).isNotNull.hasSize(2) - assertThat(meters["gql.dataLoader"]?.map { it.id.tags }) - .containsAll( - listOf( - Tags - .of("gql.loaderBatchSize", "2") - .and("gql.loaderName", "reverser") - .toList(), - Tags - .of("gql.loaderBatchSize", "2") - .and("gql.loaderName", "upperCaseLoader") - .toList(), - ), - ) - } - @Test fun `Assert metrics for a syntax error`() { mvc @@ -483,7 +387,7 @@ class MicrometerServletSmokeTest { .and("gql.operation.name", "anonymous") .and("gql.query.complexity", "none") .and("gql.query.sig.hash", "none") - .and("gql.errorDetail", "INVALID_ARGUMENT") + .and("gql.errorDetail", "none") .and("gql.errorCode", "BAD_REQUEST") .and("gql.path", "[hello]") .and("outcome", "failure"), diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/build.gradle.kts b/graphql-dgs-spring-boot-oss-autoconfigure/build.gradle.kts deleted file mode 100644 index ecdbc66d5..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/build.gradle.kts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -dependencies { - api(project(":graphql-dgs")) - api(project(":graphql-dgs-spring-webmvc")) - implementation("org.springframework:spring-web") - implementation("org.springframework.boot:spring-boot-starter") - implementation("org.apache.commons:commons-lang3") - implementation("io.micrometer:context-propagation") - - compileOnly("com.github.ben-manes.caffeine:caffeine") - compileOnly("io.micrometer:micrometer-core") - compileOnly("io.projectreactor:reactor-core") - compileOnly("org.springframework:spring-test") - compileOnly("jakarta.servlet:jakarta.servlet-api") - - testImplementation("org.springframework.boot:spring-boot-starter-web") - testImplementation("com.github.ben-manes.caffeine:caffeine") - testImplementation("io.projectreactor:reactor-core") -} diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/dependencies.lock b/graphql-dgs-spring-boot-oss-autoconfigure/dependencies.lock index 77dc1a09f..475423a2d 100644 --- a/graphql-dgs-spring-boot-oss-autoconfigure/dependencies.lock +++ b/graphql-dgs-spring-boot-oss-autoconfigure/dependencies.lock @@ -35,8 +35,7 @@ "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -51,22 +50,14 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "org.jetbrains.kotlin:kotlin-stdlib": { @@ -74,7 +65,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -140,8 +130,7 @@ "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -156,22 +145,14 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "io.micrometer:context-propagation": { @@ -241,7 +222,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -453,8 +433,7 @@ "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -469,22 +448,14 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "io.micrometer:context-propagation": { @@ -534,7 +505,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -816,8 +786,7 @@ "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -832,22 +801,14 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "io.micrometer:context-propagation": { @@ -929,7 +890,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -1472,8 +1432,7 @@ "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson:jackson-bom", - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -1551,8 +1510,7 @@ "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -1567,22 +1525,14 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.vaadin.external.google:android-json": { @@ -1822,7 +1772,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -1834,7 +1783,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", "io.mockk:mockk-agent-jvm", @@ -2172,7 +2120,6 @@ "locked": "6.1.15", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-web", "org.springframework:spring-webmvc" @@ -2607,8 +2554,7 @@ "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson:jackson-bom", - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs" ] }, "com.fasterxml.jackson:jackson-bom": { @@ -2667,8 +2613,7 @@ "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -2683,22 +2628,14 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "io.micrometer:context-propagation": { @@ -2773,8 +2710,7 @@ "locked": "2.0.21", "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs" ] }, "org.jetbrains.kotlin:kotlin-stdlib": { @@ -2782,7 +2718,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types", "org.jetbrains.kotlin:kotlin-reflect", "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm", @@ -2937,8 +2872,7 @@ "org.springframework:spring-web": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs" ] }, "org.yaml:snakeyaml": { @@ -3059,8 +2993,7 @@ "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -3075,22 +3008,14 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.vaadin.external.google:android-json": { @@ -3302,7 +3227,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", "io.mockk:mockk-agent-jvm", @@ -3670,8 +3594,7 @@ "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -3686,22 +3609,14 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.vaadin.external.google:android-json": { @@ -3881,7 +3796,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk", "io.mockk:mockk-agent", @@ -4196,8 +4110,7 @@ "locked": "2.17.3", "transitive": [ "com.fasterxml.jackson:jackson-bom", - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -4275,8 +4188,7 @@ "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -4291,22 +4203,14 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.vaadin.external.google:android-json": { @@ -4534,7 +4438,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -4546,7 +4449,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", "io.mockk:mockk-agent-jvm", @@ -4855,7 +4757,6 @@ "locked": "6.1.15", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-web", "org.springframework:spring-webmvc" diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/autoconfig/DgsAutoConfiguration.kt b/graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/autoconfig/DgsAutoConfiguration.kt index 491947299..e69de29bb 100644 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/autoconfig/DgsAutoConfiguration.kt +++ b/graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/autoconfig/DgsAutoConfiguration.kt @@ -1,407 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.autoconfig - -import com.netflix.graphql.dgs.DataLoaderInstrumentationExtensionProvider -import com.netflix.graphql.dgs.DgsDataLoaderCustomizer -import com.netflix.graphql.dgs.DgsDataLoaderInstrumentation -import com.netflix.graphql.dgs.DgsDataLoaderOptionsProvider -import com.netflix.graphql.dgs.DgsDefaultPreparsedDocumentProvider -import com.netflix.graphql.dgs.DgsFederationResolver -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.dgs.context.DgsCustomContextBuilder -import com.netflix.graphql.dgs.context.DgsCustomContextBuilderWithRequest -import com.netflix.graphql.dgs.context.GraphQLContextContributor -import com.netflix.graphql.dgs.context.GraphQLContextContributorInstrumentation -import com.netflix.graphql.dgs.exceptions.DefaultDataFetcherExceptionHandler -import com.netflix.graphql.dgs.internal.* -import com.netflix.graphql.dgs.internal.DefaultDgsQueryExecutor.ReloadSchemaIndicator -import com.netflix.graphql.dgs.internal.method.ArgumentResolver -import com.netflix.graphql.dgs.internal.method.MethodDataFetcherFactory -import com.netflix.graphql.dgs.scalars.UploadScalar -import com.netflix.graphql.mocking.MockProvider -import graphql.execution.AsyncExecutionStrategy -import graphql.execution.AsyncSerialExecutionStrategy -import graphql.execution.DataFetcherExceptionHandler -import graphql.execution.ExecutionIdProvider -import graphql.execution.ExecutionStrategy -import graphql.execution.instrumentation.ChainedInstrumentation -import graphql.execution.instrumentation.Instrumentation -import graphql.execution.preparsed.PreparsedDocumentProvider -import graphql.introspection.Introspection -import graphql.schema.DataFetcherFactory -import graphql.schema.GraphQLCodeRegistry -import graphql.schema.GraphQLSchema -import graphql.schema.idl.TypeDefinitionRegistry -import graphql.schema.visibility.GraphqlFieldVisibility -import io.micrometer.context.ContextRegistry -import io.micrometer.context.ContextSnapshotFactory -import io.micrometer.context.integration.Slf4jThreadLocalAccessor -import org.slf4j.Logger -import org.slf4j.LoggerFactory -import org.springframework.beans.factory.ObjectProvider -import org.springframework.beans.factory.annotation.Qualifier -import org.springframework.boot.autoconfigure.AutoConfiguration -import org.springframework.boot.autoconfigure.ImportAutoConfiguration -import org.springframework.boot.autoconfigure.condition.ConditionalOnClass -import org.springframework.boot.autoconfigure.condition.ConditionalOnJava -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty -import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration -import org.springframework.boot.context.properties.EnableConfigurationProperties -import org.springframework.boot.system.JavaVersion -import org.springframework.context.ApplicationContext -import org.springframework.context.annotation.Bean -import org.springframework.core.DefaultParameterNameDiscoverer -import org.springframework.core.PriorityOrdered -import org.springframework.core.annotation.Order -import org.springframework.core.env.Environment -import org.springframework.core.task.AsyncTaskExecutor -import org.springframework.core.task.SimpleAsyncTaskExecutor -import org.springframework.core.task.support.ContextPropagatingTaskDecorator -import org.springframework.http.HttpHeaders -import org.springframework.mock.web.MockHttpServletRequest -import org.springframework.web.context.request.NativeWebRequest -import org.springframework.web.context.request.WebRequest -import java.time.Duration -import java.util.Optional -import java.util.concurrent.Executors -import java.util.concurrent.ScheduledExecutorService - -/** - * Framework auto configuration based on open source Spring only, without Netflix integrations. - * This does NOT have logging, tracing, metrics and security integration. - */ -@AutoConfiguration(afterName = ["org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration"]) -@EnableConfigurationProperties(DgsConfigurationProperties::class, DgsDataloaderConfigurationProperties::class) -@ImportAutoConfiguration(classes = [JacksonAutoConfiguration::class, DgsInputArgumentConfiguration::class]) -open class DgsAutoConfiguration( - private val configProps: DgsConfigurationProperties, - private val dataloaderConfigProps: DgsDataloaderConfigurationProperties, -) { - companion object { - const val AUTO_CONF_PREFIX = "dgs.graphql" - private val LOG: Logger = LoggerFactory.getLogger(DgsAutoConfiguration::class.java) - } - - @Bean - @Order(PriorityOrdered.HIGHEST_PRECEDENCE) - open fun graphQLContextContributionInstrumentation( - graphQLContextContributors: ObjectProvider, - ): Instrumentation = GraphQLContextContributorInstrumentation(graphQLContextContributors.orderedStream().toList()) - - @Bean - open fun graphqlJavaErrorInstrumentation(): Instrumentation = GraphQLJavaErrorInstrumentation() - - @Bean - @ConditionalOnMissingBean - open fun dgsQueryExecutor( - applicationContext: ApplicationContext, - schema: GraphQLSchema, - schemaProvider: DgsSchemaProvider, - dgsDataLoaderProvider: DgsDataLoaderProvider, - dgsContextBuilder: DefaultDgsGraphQLContextBuilder, - dataFetcherExceptionHandler: DataFetcherExceptionHandler, - instrumentations: ObjectProvider, - environment: Environment, - @Qualifier("query") providedQueryExecutionStrategy: Optional, - @Qualifier("mutation") providedMutationExecutionStrategy: Optional, - idProvider: Optional, - reloadSchemaIndicator: ReloadSchemaIndicator, - preparsedDocumentProvider: ObjectProvider, - queryValueCustomizer: QueryValueCustomizer, - requestCustomizer: ObjectProvider, - ): DgsQueryExecutor { - val queryExecutionStrategy = - providedQueryExecutionStrategy.orElse(AsyncExecutionStrategy(dataFetcherExceptionHandler)) - val mutationExecutionStrategy = - providedMutationExecutionStrategy.orElse(AsyncSerialExecutionStrategy(dataFetcherExceptionHandler)) - - val instrumentationImpls = instrumentations.orderedStream().toList() - val instrumentation: Instrumentation? = - when { - instrumentationImpls.size == 1 -> instrumentationImpls.single() - instrumentationImpls.isNotEmpty() -> ChainedInstrumentation(instrumentationImpls) - else -> null - } - - return DefaultDgsQueryExecutor( - defaultSchema = schema, - schemaProvider = schemaProvider, - dataLoaderProvider = dgsDataLoaderProvider, - contextBuilder = dgsContextBuilder, - instrumentation = instrumentation, - queryExecutionStrategy = queryExecutionStrategy, - mutationExecutionStrategy = mutationExecutionStrategy, - idProvider = idProvider, - reloadIndicator = reloadSchemaIndicator, - preparsedDocumentProvider = preparsedDocumentProvider.ifAvailable, - queryValueCustomizer = queryValueCustomizer, - requestCustomizer = requestCustomizer.getIfAvailable(DgsQueryExecutorRequestCustomizer::DEFAULT_REQUEST_CUSTOMIZER), - ) - } - - @Bean - @ConditionalOnMissingBean - open fun defaultQueryValueCustomizer(): QueryValueCustomizer = QueryValueCustomizer { a -> a } - - @Bean - @ConditionalOnMissingBean - open fun dgsDataLoaderOptionsProvider(): DgsDataLoaderOptionsProvider = DefaultDataLoaderOptionsProvider() - - @Bean(destroyMethod = "shutdown") - @ConditionalOnMissingBean(name = ["dgsScheduledExecutorService"]) - @Qualifier("dgsScheduledExecutorService") - open fun dgsScheduledExecutorService(): ScheduledExecutorService = Executors.newSingleThreadScheduledExecutor() - - @Bean - @ConditionalOnProperty( - prefix = "$AUTO_CONF_PREFIX.convertAllDataLoadersToWithContext", - name = ["enabled"], - havingValue = "true", - matchIfMissing = true, - ) - @Order(0) - open fun dgsWrapWithContextDataLoaderCustomizer(): DgsWrapWithContextDataLoaderCustomizer = DgsWrapWithContextDataLoaderCustomizer() - - @Bean - @Order(100) - open fun dgsDataLoaderInstrumentationDataLoaderCustomizer( - instrumentations: List, - ): DgsDataLoaderInstrumentationDataLoaderCustomizer = DgsDataLoaderInstrumentationDataLoaderCustomizer(instrumentations) - - @Bean - open fun dgsDataLoaderProvider( - applicationContext: ApplicationContext, - dataloaderOptionProvider: DgsDataLoaderOptionsProvider, - @Qualifier("dgsScheduledExecutorService") dgsScheduledExecutorService: ScheduledExecutorService, - extensionProviders: List, - customizers: List, - ): DgsDataLoaderProvider = - DgsDataLoaderProvider( - applicationContext = applicationContext, - extensionProviders = extensionProviders, - dataLoaderOptionsProvider = dataloaderOptionProvider, - scheduledExecutorService = dgsScheduledExecutorService, - scheduleDuration = dataloaderConfigProps.scheduleDuration, - enableTickerMode = dataloaderConfigProps.tickerModeEnabled, - customizers = customizers, - ) - - /** - * Used by the [DefaultDgsQueryExecutor], it controls if, and when, such executor should reload the schema. - * This implementation will return either the boolean value of the `dgs.reload` flag - * or `true` if the `laptop` profile is an active Spring Boot profiles. - *

- * You can provide a bean of type [ReloadSchemaIndicator] if you want to control when the - * [DefaultDgsQueryExecutor] should reload the schema. - * - * @implSpec the implementation of such bean should be thread-safe. - */ - @Bean - @ConditionalOnMissingBean - open fun defaultReloadSchemaIndicator(environment: Environment): ReloadSchemaIndicator { - val isLaptopProfile = environment.activeProfiles.contains("laptop") - val hotReloadSetting = environment.getProperty("dgs.reload", Boolean::class.java, isLaptopProfile) - - return ReloadSchemaIndicator { - hotReloadSetting - } - } - - @Bean - @ConditionalOnMissingBean - open fun dgsSchemaProvider( - applicationContext: ApplicationContext, - federationResolver: Optional, - existingTypeDefinitionFactory: Optional, - existingCodeRegistry: Optional, - mockProviders: ObjectProvider, - dataFetcherResultProcessors: List, - dataFetcherExceptionHandler: Optional = Optional.empty(), - entityFetcherRegistry: EntityFetcherRegistry, - defaultDataFetcherFactory: Optional> = Optional.empty(), - methodDataFetcherFactory: MethodDataFetcherFactory, - ): DgsSchemaProvider = - DgsSchemaProvider( - applicationContext = applicationContext, - federationResolver = federationResolver, - existingTypeDefinitionRegistry = existingTypeDefinitionFactory, - mockProviders = mockProviders.toSet(), - schemaLocations = configProps.schemaLocations, - dataFetcherResultProcessors = dataFetcherResultProcessors, - dataFetcherExceptionHandler = dataFetcherExceptionHandler, - entityFetcherRegistry = entityFetcherRegistry, - defaultDataFetcherFactory = defaultDataFetcherFactory, - methodDataFetcherFactory = methodDataFetcherFactory, - schemaWiringValidationEnabled = configProps.schemaWiringValidationEnabled, - enableEntityFetcherCustomScalarParsing = configProps.enableEntityFetcherCustomScalarParsing, - ) - - @Bean - open fun entityFetcherRegistry(): EntityFetcherRegistry = EntityFetcherRegistry() - - @Bean - @ConditionalOnMissingBean - open fun dataFetcherExceptionHandler(): DataFetcherExceptionHandler = DefaultDataFetcherExceptionHandler() - - @Bean - @ConditionalOnMissingBean - open fun schema( - dgsSchemaProvider: DgsSchemaProvider, - fieldVisibility: GraphqlFieldVisibility?, - ): GraphQLSchema { - val result = - if (fieldVisibility == null) { - dgsSchemaProvider.schema(schema = null) - } else { - dgsSchemaProvider.schema(schema = null, fieldVisibility = fieldVisibility) - } - return result.graphQLSchema - } - - @Bean - @ConditionalOnProperty( - prefix = "$AUTO_CONF_PREFIX.preparsedDocumentProvider", - name = ["enabled"], - havingValue = "true", - matchIfMissing = false, - ) - @ConditionalOnMissingBean - open fun preparsedDocumentProvider(configProps: DgsConfigurationProperties): PreparsedDocumentProvider = - DgsDefaultPreparsedDocumentProvider( - configProps.preparsedDocumentProvider.maximumCacheSize, - Duration.parse(configProps.preparsedDocumentProvider.cacheValidityDuration), - ) - - // TODO: Remove when legacy modules are removed. This is also handled in DgsSpringGraphQLAutoConfiguration - @Bean - @ConditionalOnMissingBean - @ConditionalOnProperty( - prefix = "$AUTO_CONF_PREFIX.introspection", - name = ["enabled"], - havingValue = "false", - matchIfMissing = false, - ) - open fun disableIntrospectionContextContributor(): GraphQLContextContributor = - GraphQLContextContributor { - builder, - _, - _, - -> - builder.put(Introspection.INTROSPECTION_DISABLED, true) - } - - @Bean - @ConditionalOnMissingBean - open fun graphQLContextBuilder( - dgsCustomContextBuilder: Optional>, - dgsCustomContextBuilderWithRequest: Optional>, - ): DefaultDgsGraphQLContextBuilder = DefaultDgsGraphQLContextBuilder(dgsCustomContextBuilder, dgsCustomContextBuilderWithRequest) - - @Bean - @ConditionalOnMissingClass("com.netflix.graphql.dgs.springgraphql.autoconfig.DgsSpringGraphQLAutoConfiguration") - open fun uploadScalar(): UploadScalar = UploadScalar() - - @Bean - @ConditionalOnMissingBean - @ConditionalOnClass(name = ["reactor.core.publisher.Mono"]) - open fun monoReactiveDataFetcherResultProcessor(): MonoDataFetcherResultProcessor = MonoDataFetcherResultProcessor() - - @Bean - @ConditionalOnMissingBean - @ConditionalOnClass(name = ["kotlinx.coroutines.flow.Flow"]) - open fun flowReactiveDataFetcherResultProcessor(): FlowDataFetcherResultProcessor = FlowDataFetcherResultProcessor() - - @Bean - @ConditionalOnMissingBean - @ConditionalOnClass(name = ["reactor.core.publisher.Flux"]) - open fun fluxReactiveDataFetcherResultProcessor(): FluxDataFetcherResultProcessor = FluxDataFetcherResultProcessor() - - /** - * JDK 21+ only - Creates the dgsAsyncTaskExecutor which is used to run data fetchers automatically wrapped in CompletableFuture. - * Can be provided by other frameworks to enable context propagation. - */ - @Bean - @Qualifier("dgsAsyncTaskExecutor") - @ConditionalOnJava(JavaVersion.TWENTY_ONE) - @ConditionalOnMissingBean(name = ["dgsAsyncTaskExecutor"]) - @ConditionalOnProperty(name = ["dgs.graphql.virtualthreads.enabled"], havingValue = "true", matchIfMissing = false) - open fun virtualThreadsTaskExecutor(): AsyncTaskExecutor { - LOG.info("Enabling virtual threads for DGS") - - val contextRegistry = - ContextRegistry() - .loadContextAccessors() - .loadThreadLocalAccessors() - .registerThreadLocalAccessor(Slf4jThreadLocalAccessor()) - - val executor = SimpleAsyncTaskExecutor("dgs-virtual-thread-") - executor.setVirtualThreads(true) - executor.setTaskDecorator( - ContextPropagatingTaskDecorator(ContextSnapshotFactory.builder().contextRegistry(contextRegistry).build()), - ) - return executor - } - - @Bean - open fun methodDataFetcherFactory( - argumentResolvers: ObjectProvider, - @Qualifier("dgsAsyncTaskExecutor") taskExecutorOptional: Optional, - ): MethodDataFetcherFactory { - val taskExecutor = - if (taskExecutorOptional.isPresent) { - taskExecutorOptional.get() - } else { - null - } - - return MethodDataFetcherFactory(argumentResolvers.orderedStream().toList(), DefaultParameterNameDiscoverer(), taskExecutor) - } - - @Bean - @ConditionalOnClass(name = ["org.springframework.mock.web.MockHttpServletRequest"]) - open fun mockRequestHeaderCustomizer(): DgsQueryExecutorRequestCustomizer { - /** - * [DgsQueryExecutorRequestCustomizer] implementation which copies headers into - * the request if the request is [MockHttpServletRequest]; intended to support - * test use cases. - */ - return object : DgsQueryExecutorRequestCustomizer { - override fun apply( - request: WebRequest?, - headers: HttpHeaders?, - ): WebRequest? { - if (headers.isNullOrEmpty() || request !is NativeWebRequest) { - return request - } - val mockRequest = - request.nativeRequest as? MockHttpServletRequest - ?: return request - headers.forEach { key, value -> - if (mockRequest.getHeader(key) == null) { - mockRequest.addHeader(key, value) - } - } - return request - } - - override fun toString(): String = "{MockRequestHeaderCustomizer}" - } - } -} diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/graphql-dgs-spring-boot-oss-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json deleted file mode 100644 index e6ec09538..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "groups": [], - "properties": [ - { - "name": "dgs.graphql.introspection.enabled", - "type": "java.lang.Boolean", - "description": "Setting this value to false will prevent Introspection queries from being performed. Note that this is against GraphQL Specification, that said, some production systems want this lock down in place for security concerns." - }, - { - "name": "dgs.graphql.virtualthreads.enabled", - "type": "java.lang.Boolean", - "description": "Setting this value will enable virtual threads for data fetchers when running on JDK 21+. This enables parallel data fetcher behavior without explicitly using CompletableFuture." - } - ], - "hints": [] -} \ No newline at end of file diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/resources/META-INF/spring.factories b/graphql-dgs-spring-boot-oss-autoconfigure/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 4aa7d9d81..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,2 +0,0 @@ -org.springframework.boot.diagnostics.FailureAnalyzer=\ - com.netflix.graphql.dgs.diagnostics.SchemaFailureAnalyzer diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/graphql-dgs-spring-boot-oss-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index 0636139ee..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1,2 +0,0 @@ -com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -com.netflix.graphql.dgs.apq.DgsAPQSupportAutoConfiguration diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/AutoConfigWithExistingExecutableSchemaTest.kt b/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/AutoConfigWithExistingExecutableSchemaTest.kt deleted file mode 100644 index 83a9b4dac..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/AutoConfigWithExistingExecutableSchemaTest.kt +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.autoconfig - -import com.netflix.graphql.dgs.DgsQueryExecutor -import graphql.Scalars.GraphQLString -import graphql.schema.DataFetcher -import graphql.schema.FieldCoordinates.coordinates -import graphql.schema.GraphQLCodeRegistry -import graphql.schema.GraphQLCodeRegistry.newCodeRegistry -import graphql.schema.GraphQLFieldDefinition.newFieldDefinition -import graphql.schema.GraphQLObjectType -import graphql.schema.GraphQLObjectType.newObject -import graphql.schema.GraphQLSchema -import org.assertj.core.api.Assertions -import org.junit.jupiter.api.Test -import org.springframework.boot.autoconfigure.AutoConfigurations -import org.springframework.boot.test.context.runner.WebApplicationContextRunner -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration - -class AutoConfigWithExistingExecutableSchemaTest { - private val context = WebApplicationContextRunner().withConfiguration(AutoConfigurations.of(DgsAutoConfiguration::class.java))!! - - @Configuration - open class ConfigWithSchema { - @Bean - open fun schema(): GraphQLSchema { - val helloDataFetcher: DataFetcher = DataFetcher { "Hello" } - - val objectType: GraphQLObjectType = - newObject() - .name("QueryType") - .field( - newFieldDefinition() - .name("hello") - .type(GraphQLString), - ).build() - - val codeRegistry: GraphQLCodeRegistry = - newCodeRegistry() - .dataFetcher( - coordinates("QueryType", "hello"), - helloDataFetcher, - ).build() - - return GraphQLSchema - .newSchema() - .query(objectType) - .codeRegistry(codeRegistry) - .build() - } - } - - @Test - fun existingSchema() { - context.withUserConfiguration(ConfigWithSchema::class.java).run { ctx -> - Assertions - .assertThat(ctx) - .getBean(DgsQueryExecutor::class.java) - .extracting { - it.executeAndExtractJsonPath("query { hello }", "data.hello") - }.isEqualTo("Hello") - } - } -} diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/CustomFederationResolverTest.kt b/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/CustomFederationResolverTest.kt deleted file mode 100644 index 7437056ed..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/CustomFederationResolverTest.kt +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.autoconfig - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsEntityFetcher -import com.netflix.graphql.dgs.DgsFederationResolver -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.dgs.federation.DefaultDgsFederationResolver -import org.assertj.core.api.Assertions.assertThat -import org.junit.jupiter.api.Test -import org.springframework.boot.autoconfigure.AutoConfigurations -import org.springframework.boot.test.context.runner.WebApplicationContextRunner -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration - -class CustomFederationResolverTest { - private val context: WebApplicationContextRunner = - WebApplicationContextRunner() - .withConfiguration(AutoConfigurations.of(DgsAutoConfiguration::class.java)) - - @Test - fun `When a custom federation resolver is registered, it should be used`() { - context.withUserConfiguration(MyFederationConfig::class.java).run { ctx -> - assertThat(ctx).getBean(DgsQueryExecutor::class.java).extracting { - val representation = mapOf("__typename" to "MyMovie", "id" to "1") - val variables = mapOf("representations" to listOf(representation)) - - val title = - it.executeAndExtractJsonPathAsObject( - """query (${'$'}representations:[_Any!]!) { - _entities(representations:${'$'}representations) { - ... on MyMovie { - title - } - } - }""", - "data['_entities'][0].title", - variables, - String::class.java, - ) - - assertThat(title).isEqualTo("some title") - } - } - } - - @Configuration - open class MyFederationConfig { - @Bean - open fun federationResolver(): DgsFederationResolver = MyFederationResolver() - - @Bean - open fun movieFetcher(): MovieDataFetcher = MovieDataFetcher() - } - - @DgsComponent - class MovieDataFetcher { - @DgsEntityFetcher(name = "MyMovie") - fun movieEntityFetcher( - @Suppress("unused_parameter") arguments: Map, - ): Movie = Movie() - } - - class MyFederationResolver : DefaultDgsFederationResolver() { - override fun typeMapping(): Map, String> = mapOf(Movie::class.java to "MyMovie") - } - - class Movie { - val title: String = "some title" - } -} diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/DefaultExceptionHandlerTest.kt b/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/DefaultExceptionHandlerTest.kt deleted file mode 100644 index 52ac1f752..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/DefaultExceptionHandlerTest.kt +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.autoconfig - -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.dgs.autoconfig.testcomponents.TestExceptionDatFetcherConfig -import com.netflix.graphql.dgs.exceptions.QueryException -import org.assertj.core.api.Assertions.assertThat -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.assertThrows -import org.springframework.boot.autoconfigure.AutoConfigurations -import org.springframework.boot.test.context.runner.WebApplicationContextRunner - -class DefaultExceptionHandlerTest { - private val context = WebApplicationContextRunner().withConfiguration(AutoConfigurations.of(DgsAutoConfiguration::class.java))!! - - @Test - fun queryDocumentWithDefaultException() { - val error: QueryException = - assertThrows { - context.withUserConfiguration(TestExceptionDatFetcherConfig::class.java).run { ctx -> - assertThat(ctx).getBean(DgsQueryExecutor::class.java).extracting { - it.executeAndGetDocumentContext("{errorTest}") - } - } - } - assertThat(error.errors.size).isEqualTo(1) - - assertThat(error.errors[0].extensions["errorType"]).isEqualTo("INTERNAL") - } -} diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/DgsAutoConfigurationTest.kt b/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/DgsAutoConfigurationTest.kt deleted file mode 100644 index dee93e606..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/DgsAutoConfigurationTest.kt +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.autoconfig - -import com.netflix.graphql.dgs.DgsDataLoaderOptionsProvider -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.dgs.autoconfig.testcomponents.CustomContextBuilderConfig -import com.netflix.graphql.dgs.autoconfig.testcomponents.CustomDataFetcherFactoryFixtures -import com.netflix.graphql.dgs.autoconfig.testcomponents.CustomDataLoaderOptionsProvider -import com.netflix.graphql.dgs.autoconfig.testcomponents.CustomInputObjectMapperConfig -import com.netflix.graphql.dgs.autoconfig.testcomponents.DataFetcherWithInputObject -import com.netflix.graphql.dgs.autoconfig.testcomponents.DataLoaderConfig -import com.netflix.graphql.dgs.autoconfig.testcomponents.HelloDataFetcherConfig -import com.netflix.graphql.dgs.exceptions.NoSchemaFoundException -import com.netflix.graphql.dgs.internal.DefaultDataLoaderOptionsProvider -import com.netflix.graphql.dgs.internal.InputObjectMapper -import com.netflix.graphql.dgs.internal.method.ContinuationArgumentResolver -import com.netflix.graphql.dgs.internal.method.DataFetchingEnvironmentArgumentResolver -import com.netflix.graphql.dgs.internal.method.FallbackEnvironmentArgumentResolver -import com.netflix.graphql.dgs.internal.method.InputArgumentResolver -import org.assertj.core.api.Assertions.assertThat -import org.intellij.lang.annotations.Language -import org.junit.jupiter.api.Test -import org.springframework.boot.autoconfigure.AutoConfigurations -import org.springframework.boot.test.context.FilteredClassLoader -import org.springframework.boot.test.context.runner.WebApplicationContextRunner -import org.springframework.core.io.ClassPathResource - -class DgsAutoConfigurationTest { - private val context = WebApplicationContextRunner().withConfiguration(AutoConfigurations.of(DgsAutoConfiguration::class.java)) - - @Test - fun noSchemaException() { - context.withClassLoader(FilteredClassLoader(ClassPathResource("schema/"))).run { ctx -> - assertThat(ctx).failure.hasRootCauseInstanceOf(NoSchemaFoundException::class.java) - } - } - - @Test - fun setUpCustomDataFetcherFactory() { - context - .withUserConfiguration( - CustomDataFetcherFactoryFixtures.CustomDataFetcherFactoryConfiguration::class.java, - CustomDataFetcherFactoryFixtures.ExplicitDataFetcherComponent::class.java, - ).run { ctx -> - assertThat(ctx).getBean(DgsQueryExecutor::class.java).extracting { - val executeQuery = - it.executeAndExtractJsonPath( - "query {simpleNested{hello}}", - "data.simpleNested.hello", - ) - assertThat(executeQuery).isEqualTo("not world") - } - } - } - - @Test - fun setsUpQueryExecutorWithDataFetcher() { - context.withUserConfiguration(HelloDataFetcherConfig::class.java).run { ctx -> - assertThat(ctx).getBean(DgsQueryExecutor::class.java).extracting { - val executeQuery = it.executeAndExtractJsonPath("query {hello}", "data.hello") - assertThat(executeQuery).isEqualTo("Hello!") - } - } - } - - @Test - fun dataLoaderGetsRegistered() { - context.withUserConfiguration(DataLoaderConfig::class.java).run { ctx -> - assertThat(ctx).getBean(DgsQueryExecutor::class.java).extracting { - val json = it.executeAndExtractJsonPath>("{names}", "data.names") - assertThat(json).isEqualTo(listOf("A", "B", "C")) - } - } - } - - @Test - fun mappedDataLoaderGetsRegistered() { - context.withUserConfiguration(DataLoaderConfig::class.java).run { ctx -> - assertThat(ctx).getBean(DgsQueryExecutor::class.java).extracting { - val json = - it.executeAndExtractJsonPath>( - "{namesFromMapped}", - "data.namesFromMapped", - ) - assertThat(json).isEqualTo(listOf("A", "B", "C")) - } - } - } - - @Test - fun customContext() { - context.withUserConfiguration(CustomContextBuilderConfig::class.java).run { ctx -> - assertThat(ctx).getBean(DgsQueryExecutor::class.java).extracting { - val json = it.executeAndExtractJsonPath("{hello}", "data.hello") - assertThat(json).isEqualTo("Hello custom context") - } - } - } - - @Test - fun enabledIntrospectionTest() { - context.withUserConfiguration(CustomContextBuilderConfig::class.java).run { ctx -> - assertThat(ctx).getBean(DgsQueryExecutor::class.java).extracting { - @Language("graphql") - val query = - """ - query availableQueries { - __schema { - queryType { - fields { - name - description - } - } - } - } - """.trimIndent() - - val json = - it.executeAndExtractJsonPath( - query, - "data.__schema.queryType.fields[0].name", - ) - assertThat(json).isEqualTo("hello") - } - } - } - - @Test - fun `DGS Input Argument beans are available`() { - context.run { ctx -> - assertThat(ctx).getBean("defaultInputObjectMapper", InputObjectMapper::class.java).isNotNull - assertThat(ctx).getBean("inputArgumentResolver", InputArgumentResolver::class.java).isNotNull - assertThat( - ctx, - ).getBean("dataFetchingEnvironmentArgumentResolver", DataFetchingEnvironmentArgumentResolver::class.java).isNotNull - assertThat(ctx).getBean("coroutineArgumentResolver", ContinuationArgumentResolver::class.java).isNotNull - assertThat(ctx).getBean("fallbackEnvironmentArgumentResolver", FallbackEnvironmentArgumentResolver::class.java).isNotNull - } - } - - @Test - fun `DGS custom data loader options beans is available and used`() { - context.withUserConfiguration(DataLoaderConfig::class.java).run { ctx -> - assertThat(ctx).getBean(DgsDataLoaderOptionsProvider::class.java).isNotNull() - assertThat( - ctx, - ).getBean(DgsDataLoaderOptionsProvider::class.java).isExactlyInstanceOf(CustomDataLoaderOptionsProvider::class.java) - } - } - - @Test - fun `DGS default data loader options bean is available`() { - context.run { ctx -> - assertThat(ctx).getBean(DgsDataLoaderOptionsProvider::class.java).isNotNull() - assertThat( - ctx, - ).getBean(DgsDataLoaderOptionsProvider::class.java).isExactlyInstanceOf(DefaultDataLoaderOptionsProvider::class.java) - } - } - - @Test - fun `It should be possible to override default input object mapper`() { - context.withUserConfiguration(CustomInputObjectMapperConfig::class.java).run { ctx -> - assertThat(ctx) - .getBean(DgsQueryExecutor::class.java) - .extracting { - @Language("graphql") - val query = - """ - query withIgnoredFields { - withIgnoredField( - input: { ignoredField: "this should be ignored", name: "this should be included" } - ) { - ignoredField - name - } - } - """.trimIndent() - - it.executeAndExtractJsonPathAsObject( - query, - "data.withIgnoredField", - DataFetcherWithInputObject.Input::class.java, - ) - }.isEqualTo(DataFetcherWithInputObject.Input(null, "this should be included")) - } - } - - @Test - fun `Nested input objects should use overridden input object mapper`() { - context.withUserConfiguration(CustomInputObjectMapperConfig::class.java).run { ctx -> - assertThat(ctx) - .getBean(DgsQueryExecutor::class.java) - .extracting { - @Language("graphql") - val query: String = - """ - query withIgnoredFields { - withIgnoredFieldNested( - nestedInput: { - input: { ignoredField: "this should be ignored", name: "this should be included" } - } - ) { - ignoredField - name - } - } - """.trimIndent() - - it.executeAndExtractJsonPathAsObject( - query, - "data.withIgnoredFieldNested", - DataFetcherWithInputObject.Input::class.java, - ) - }.isEqualTo(DataFetcherWithInputObject.Input(null, "this should be included")) - } - } -} diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/DgsConfigurationPropertiesTest.kt b/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/DgsConfigurationPropertiesTest.kt deleted file mode 100644 index 1b0387d83..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/DgsConfigurationPropertiesTest.kt +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.autoconfig - -import org.assertj.core.api.Assertions -import org.junit.jupiter.api.Test -import org.springframework.boot.context.properties.bind.Binder -import org.springframework.boot.context.properties.source.ConfigurationPropertySource -import org.springframework.boot.context.properties.source.MapConfigurationPropertySource -import java.util.* - -class DgsConfigurationPropertiesTest { - @Test - fun schemaLocationsDefault() { - val properties = bind(Collections.emptyMap()) - Assertions.assertThat(properties.schemaLocations).containsExactly("classpath*:schema/**/*.graphql*") - } - - @Test - fun schemaLocationsCustom() { - val properties = bind("dgs.graphql.schema-locations", "file:/some/resource/path/schema.graphqls") - Assertions.assertThat(properties.schemaLocations).containsExactly("file:/some/resource/path/schema.graphqls") - } - - @Test - fun schemaLocationsCustomMultiple() { - val properties = bind("dgs.graphql.schema-locations", "foo.graphqls, bar.graphqls") - Assertions.assertThat(properties.schemaLocations).containsExactly("foo.graphqls", "bar.graphqls") - } - - private fun bind( - name: String, - value: String, - ): DgsConfigurationProperties = bind(Collections.singletonMap(name, value)) - - private fun bind(map: Map): DgsConfigurationProperties { - val source: ConfigurationPropertySource = MapConfigurationPropertySource(map) - return Binder(source).bindOrCreate("dgs.graphql", DgsConfigurationProperties::class.java) - } -} diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/DisabledIntrospectionTest.kt b/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/DisabledIntrospectionTest.kt deleted file mode 100644 index 2bff67433..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/DisabledIntrospectionTest.kt +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.autoconfig - -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.dgs.autoconfig.testcomponents.CustomContextBuilderConfig -import org.assertj.core.api.Assertions.assertThat -import org.junit.jupiter.api.Test -import org.springframework.boot.autoconfigure.AutoConfigurations -import org.springframework.boot.test.context.runner.WebApplicationContextRunner - -class DisabledIntrospectionTest { - private val context = - WebApplicationContextRunner() - .withConfiguration(AutoConfigurations.of(DgsAutoConfiguration::class.java)) - .withPropertyValues("dgs.graphql.introspection.enabled=false")!! - - @Test - fun disabledIntrospectionTest() { - context.withUserConfiguration(CustomContextBuilderConfig::class.java).run { ctx -> - assertThat(ctx).getBean(DgsQueryExecutor::class.java).extracting { - val json = - it.execute( - " query availableQueries {\n" + - " __schema {\n" + - " queryType {\n" + - " fields {\n" + - " name\n" + - " description\n" + - " }\n" + - " }\n" + - " }\n" + - "}", - ) - assertThat(json.errors.size).isGreaterThan(0) - } - } - } -} diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/QueryExecutorTest.kt b/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/QueryExecutorTest.kt deleted file mode 100644 index ae59d4bf4..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/QueryExecutorTest.kt +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.autoconfig - -import com.jayway.jsonpath.PathNotFoundException -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.dgs.autoconfig.testcomponents.HelloDataFetcherConfig -import com.netflix.graphql.dgs.exceptions.QueryException -import graphql.ExecutionResult -import org.assertj.core.api.Assertions.assertThat -import org.assertj.core.api.Assertions.tuple -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.assertThrows -import org.springframework.boot.autoconfigure.AutoConfigurations -import org.springframework.boot.test.context.runner.WebApplicationContextRunner -import org.springframework.http.HttpHeaders -import org.springframework.util.LinkedMultiValueMap - -class QueryExecutorTest { - private val context = - WebApplicationContextRunner() - .withConfiguration(AutoConfigurations.of(DgsAutoConfiguration::class.java)) - - @Test - fun query() { - context.withUserConfiguration(HelloDataFetcherConfig::class.java).run { ctx -> - assertThat(ctx) - .getBean(DgsQueryExecutor::class.java) - .extracting { - it.executeAndExtractJsonPath("{ hello }", "data.hello") - }.isEqualTo("Hello!") - } - } - - @Test - fun queryWithHeaderNotThrowsException() { - val headers = LinkedMultiValueMap() - headers.add(HttpHeaders.AUTHORIZATION, "test") - context.withUserConfiguration(HelloDataFetcherConfig::class.java).run { ctx -> - assertThat(ctx).getBean(DgsQueryExecutor::class.java).extracting { - it.executeAndGetDocumentContext("{ helloWithHeader }", mapOf(), HttpHeaders(headers)) - } - } - } - - @Test - fun queryWithArgument() { - context.withUserConfiguration(HelloDataFetcherConfig::class.java).run { ctx -> - assertThat(ctx) - .getBean(DgsQueryExecutor::class.java) - .extracting { - it.executeAndExtractJsonPath("{ hello(name: \"DGS\") }", "data.hello") - }.isEqualTo("Hello, DGS!") - } - } - - @Test - fun queryWithVariables() { - context.withUserConfiguration(HelloDataFetcherConfig::class.java).run { ctx -> - assertThat(ctx) - .getBean(DgsQueryExecutor::class.java) - .extracting { - it.executeAndExtractJsonPath( - "query(\$name: String) { hello(name: \$name) }", - "data.hello", - mapOf(Pair("name", "DGS")), - ) - }.isEqualTo("Hello, DGS!") - } - } - - @Test - fun queryWithQueryError() { - context.withUserConfiguration(HelloDataFetcherConfig::class.java).run { ctx -> - assertThrows { - ctx.getBean(DgsQueryExecutor::class.java).executeAndExtractJsonPath("{unknown}", "data.unknown") - } - } - } - - @Test - fun queryWithJsonPathError() { - context.withUserConfiguration(HelloDataFetcherConfig::class.java).run { ctx -> - assertThrows { - ctx.getBean(DgsQueryExecutor::class.java).executeAndExtractJsonPath("{hello}", "data.unknown") - } - } - } - - @Test - fun queryDocumentWithArgument() { - context.withUserConfiguration(HelloDataFetcherConfig::class.java).run { ctx -> - assertThat(ctx) - .getBean(DgsQueryExecutor::class.java) - .extracting { - it.executeAndGetDocumentContext("{ hello(name: \"DGS\") }").read("data.hello") - }.isEqualTo("Hello, DGS!") - } - } - - @Test - fun queryDocumentWithVariables() { - context.withUserConfiguration(HelloDataFetcherConfig::class.java).run { ctx -> - assertThat(ctx) - .getBean(DgsQueryExecutor::class.java) - .extracting { - it - .executeAndGetDocumentContext( - "query(\$name: String) { hello(name: \$name) }", - mapOf(Pair("name", "DGS")), - ).read("data.hello") - }.isEqualTo("Hello, DGS!") - } - } - - @Test - fun queryDocumentWithError() { - val error: QueryException = - assertThrows { - context.withUserConfiguration(HelloDataFetcherConfig::class.java).run { ctx -> - assertThat(ctx).getBean(DgsQueryExecutor::class.java).extracting { - it.executeAndGetDocumentContext("{ unknown }") - } - } - } - - assertThat(error.errors.size).isEqualTo(1) - assertThat( - error.errors[0].message, - ).isEqualTo("Validation error (FieldUndefined@[unknown]) : Field 'unknown' in type 'Query' is undefined") - } - - @Test - fun queryBasicExecute() { - context.withUserConfiguration(HelloDataFetcherConfig::class.java).run { ctx -> - assertThat(ctx) - .getBean(DgsQueryExecutor::class.java) - .extracting { - it.execute("{hello}").isDataPresent - }.isEqualTo(true) - } - } - - @Test - fun queryBasicExecuteWithError() { - context.withUserConfiguration(HelloDataFetcherConfig::class.java).run { ctx -> - assertThat(ctx) - .getBean(DgsQueryExecutor::class.java) - .extracting { - it.execute("{unknown}").errors?.size - }.isEqualTo(1) - } - } - - @Test - fun queryReturnsNullForField() { - context.withUserConfiguration(HelloDataFetcherConfig::class.java).run { ctx -> - assertThat(ctx) - .getBean(DgsQueryExecutor::class.java) - .extracting { - val execute: ExecutionResult = it.execute("{withNullableNull}") - tuple(execute.getData>()?.get("withNulableNull"), execute.errors?.size) - }.isEqualTo(tuple(null, 0)) - } - } - - @Test - fun queryReturnsErrorForNonNullableField() { - context.withUserConfiguration(HelloDataFetcherConfig::class.java).run { ctx -> - assertThat(ctx) - .getBean(DgsQueryExecutor::class.java) - .extracting { - val execute = it.execute("{withNonNullableNull}") - tuple(execute.getData>()?.get("withNonNullableNull"), execute.errors?.size) - }.isEqualTo(tuple(null, 1)) - } - } -} diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/testcomponents/CustomDataFetcherFactoryFixtures.kt b/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/testcomponents/CustomDataFetcherFactoryFixtures.kt deleted file mode 100644 index 11ca8d22b..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/testcomponents/CustomDataFetcherFactoryFixtures.kt +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.autoconfig.testcomponents - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsData -import graphql.schema.DataFetcher -import graphql.schema.DataFetcherFactories -import graphql.schema.DataFetcherFactory -import graphql.schema.DataFetchingEnvironment -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration - -object CustomDataFetcherFactoryFixtures { - @Configuration - open class CustomDataFetcherFactoryConfiguration { - @Bean - open fun customDataFetcherFactory(): DataFetcherFactory<*> = DataFetcherFactories.useDataFetcher(TestDataFetcher) - - object TestDataFetcher : DataFetcher { - override fun get(environment: DataFetchingEnvironment): Any = "not world" - } - } - - @DgsComponent - class ExplicitDataFetcherComponent { - @DgsData(parentType = "Query", field = "simpleNested") - fun hello(): SimpleNested = SimpleNested("world") - - data class SimpleNested( - val hello: String, - ) - } -} diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/testcomponents/CustomInputObjectComponents.kt b/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/testcomponents/CustomInputObjectComponents.kt deleted file mode 100644 index 9670951da..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/testcomponents/CustomInputObjectComponents.kt +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.autoconfig.testcomponents - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsQuery -import com.netflix.graphql.dgs.InputArgument -import com.netflix.graphql.dgs.internal.DefaultInputObjectMapper -import com.netflix.graphql.dgs.internal.InputObjectMapper -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration -import kotlin.reflect.KClass - -@Configuration -open class CustomInputObjectMapperConfig { - @Bean - open fun inputObjectMapper(): InputObjectMapper { - return object : InputObjectMapper { - override fun mapToKotlinObject( - inputMap: Map, - targetClass: KClass, - ): T { - val filteredInputMap = inputMap.filterKeys { !it.startsWith("ignore") } - return DefaultInputObjectMapper(this).mapToKotlinObject(filteredInputMap, targetClass) - } - - override fun mapToJavaObject( - inputMap: Map, - targetClass: Class, - ): T { - val filteredInputMap = inputMap.filterKeys { !it.startsWith("ignore") } - return DefaultInputObjectMapper(this).mapToJavaObject(filteredInputMap, targetClass) - } - } - } - - @Bean - open fun dataFetcher(): DataFetcherWithInputObject = DataFetcherWithInputObject() -} - -@DgsComponent -class DataFetcherWithInputObject { - @DgsQuery - fun withIgnoredField( - @InputArgument input: Input, - ): Input = input - - @DgsQuery - fun withIgnoredFieldNested( - @InputArgument nestedInput: NestedInput, - ): Input = nestedInput.input - - data class Input( - val ignoredField: String?, - val name: String, - ) - - data class NestedInput( - val input: Input, - ) -} diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/testcomponents/HelloDataFetcher.kt b/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/testcomponents/HelloDataFetcher.kt deleted file mode 100644 index da679c138..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/testcomponents/HelloDataFetcher.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.autoconfig.testcomponents - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsData -import graphql.schema.DataFetchingEnvironment -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration - -/** - * Config class for the Hello data fetcher test - */ -@Configuration -open class HelloDataFetcherConfig { - @Bean - open fun createDgsComponent(): HelloDataFetcher = HelloDataFetcher() -} - -@DgsComponent -class HelloDataFetcher { - @DgsData(parentType = "Query", field = "hello") - fun hello(dfe: DataFetchingEnvironment): String { - if (dfe.arguments["name"] != null) { - return "Hello, ${dfe.arguments["name"]}!" - } - - return "Hello!" - } - - @DgsData(parentType = "Query", field = "withNullableNull") - fun withNullableNull(): String? = null - - @DgsData(parentType = "Query", field = "withNonNullableNull") - fun withNonNullableNull(): String? = null -} diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/testcomponents/MyCustomDgsContextBuilder.kt b/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/testcomponents/MyCustomDgsContextBuilder.kt deleted file mode 100644 index 25b0b9a6e..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/testcomponents/MyCustomDgsContextBuilder.kt +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.autoconfig.testcomponents - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsData -import com.netflix.graphql.dgs.context.DgsContext -import com.netflix.graphql.dgs.context.DgsCustomContextBuilder -import graphql.schema.DataFetchingEnvironment -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration - -@Configuration -open class CustomContextBuilderConfig { - @Bean - open fun createCustomContextBuilder(): DgsCustomContextBuilder<*> = MyCustomDgsContextBuilder() - - @Bean - open fun createDataFetcher(): CustomContextDataFetcher = CustomContextDataFetcher() -} - -class MyCustomDgsContextBuilder : DgsCustomContextBuilder { - override fun build(): MyCustomContext = MyCustomContext("Hello custom context") -} - -class MyCustomContext( - val message: String, -) - -@DgsComponent -class CustomContextDataFetcher { - @DgsData(parentType = "Query", field = "hello") - fun hello(dfe: DataFetchingEnvironment): String { - val customContext = DgsContext.getCustomContext(dfe) - return customContext.message - } -} diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/testcomponents/TestDataLoader.kt b/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/testcomponents/TestDataLoader.kt deleted file mode 100644 index 79fc1e1e6..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/testcomponents/TestDataLoader.kt +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.autoconfig.testcomponents - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsData -import com.netflix.graphql.dgs.DgsDataLoader -import com.netflix.graphql.dgs.DgsDataLoaderOptionsProvider -import graphql.schema.DataFetchingEnvironment -import org.dataloader.BatchLoader -import org.dataloader.DataLoaderOptions -import org.dataloader.MappedBatchLoader -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration -import java.util.concurrent.CompletableFuture -import java.util.concurrent.CompletionStage - -@DgsDataLoader(name = "testloader") -class TestDataLoader : BatchLoader { - override fun load(keys: List): CompletionStage> = CompletableFuture.supplyAsync { keys.map { it.uppercase() } } -} - -@DgsComponent -class FetcherUsingDataLoader { - @DgsData(parentType = "Query", field = "names") - fun hello(dfe: DataFetchingEnvironment): CompletableFuture> { - val dataLoader = - dfe.getDataLoader("testloader") - ?: throw AssertionError("testloader not found") - return dataLoader.loadMany(listOf("a", "b", "c")) - } -} - -@DgsDataLoader(name = "testMappedLoader") -class TestMappedDataLoader : MappedBatchLoader { - override fun load(keys: Set): CompletionStage> = - CompletableFuture.supplyAsync { keys.associateWith { it.uppercase() } } -} - -@DgsComponent -class FetcherUsingMappedDataLoader { - @DgsData(parentType = "Query", field = "namesFromMapped") - fun hello(dfe: DataFetchingEnvironment): CompletableFuture> { - val dataLoader = - dfe.getDataLoader("testMappedLoader") - ?: throw AssertionError("testMappedLoader not found") - return dataLoader.loadMany(listOf("a", "b", "c")) - } -} - -@Configuration -open class DataLoaderConfig { - @Bean - open fun createDataLoader(): BatchLoader = TestDataLoader() - - @Bean - open fun createFetcher(): FetcherUsingDataLoader = FetcherUsingDataLoader() - - @Bean - open fun createMappedDataLoader(): MappedBatchLoader = TestMappedDataLoader() - - @Bean - open fun createFetcherUsingMappedLoader(): FetcherUsingMappedDataLoader = FetcherUsingMappedDataLoader() - - @Bean - open fun dgsDataLoaderOptionsProvider(): DgsDataLoaderOptionsProvider = CustomDataLoaderOptionsProvider() -} - -class CustomDataLoaderOptionsProvider : DgsDataLoaderOptionsProvider { - override fun getOptions( - dataLoaderName: String, - annotation: DgsDataLoader, - ): DataLoaderOptions { - val options = - DataLoaderOptions() - .setBatchingEnabled(false) - .setCachingEnabled(false) - - options.setMaxBatchSize(50) - return options - } -} diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/testcomponents/TestExceptionDataFetchers.kt b/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/testcomponents/TestExceptionDataFetchers.kt deleted file mode 100644 index 430d05a16..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/autoconfig/testcomponents/TestExceptionDataFetchers.kt +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.autoconfig.testcomponents - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsData -import graphql.schema.DataFetchingEnvironment -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration - -/* - Config class for the security data fetcher test - */ -@Configuration -open class TestExceptionDatFetcherConfig { - @Bean - open fun createDgsComponent(): TestExceptionDataFetcher = TestExceptionDataFetcher() -} - -@Suppress("UNUSED_PARAMETER") -@DgsComponent -class TestExceptionDataFetcher { - @DgsData(parentType = "Query", field = "errorTest") - fun errorTest(dfe: DataFetchingEnvironment): String = throw RuntimeException() -} diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/diagnostics/SchemaFailureAnalyzerTest.kt b/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/diagnostics/SchemaFailureAnalyzerTest.kt deleted file mode 100644 index b11952189..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/diagnostics/SchemaFailureAnalyzerTest.kt +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.diagnostics - -import graphql.schema.idl.SchemaParser -import graphql.schema.idl.errors.SchemaProblem -import org.assertj.core.api.Assertions.assertThat -import org.junit.jupiter.api.Test - -class SchemaFailureAnalyzerTest { - private val analyzer = SchemaFailureAnalyzer() - - @Test - fun testInvalidSyntax() { - val analysis = analyzer.analyze(createFailure()) - assertThat(analysis.description).startsWith("There are problems with the GraphQL Schema") - assertThat(analysis.description).contains("InvalidSyntaxError") - } - - private fun createFailure(): SchemaProblem = - try { - SchemaParser().parse("bad schema") - error("Expected failure did not occur") - } catch (exc: SchemaProblem) { - exc - } -} diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/resources/schema/schema.graphqls b/graphql-dgs-spring-boot-oss-autoconfigure/src/test/resources/schema/schema.graphqls deleted file mode 100644 index d08fef9a2..000000000 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/test/resources/schema/schema.graphqls +++ /dev/null @@ -1,49 +0,0 @@ -type Query { - hello(name: String): String - - quotes(id: Int): String - - names: [String] - - namesFromMapped: [String] - - #Security examples - deny: String - errorTest: String - - #Header example - helloWithHeader(name: String): String - - withNullableNull: String - - withNonNullableNull: String! - - withIgnoredField(input: Input): Output - - withIgnoredFieldNested(nestedInput: NestedInput): Output - - simpleNested: SimpleNested! -} - -type SimpleNested { - hello: String! -} - -input Input { - ignoredField: String - name: String -} - -type Output { - ignoredField: String - name: String -} - -input NestedInput { - input: Input -} - -type MyMovie @key(fields: "id") @extends { - id: String - title: String -} \ No newline at end of file diff --git a/graphql-dgs-spring-boot-starter/build.gradle.kts b/graphql-dgs-spring-boot-starter/build.gradle.kts deleted file mode 100644 index f53b8ad8f..000000000 --- a/graphql-dgs-spring-boot-starter/build.gradle.kts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -dependencies { - api(project(":graphql-dgs-spring-boot-oss-autoconfigure")) - api(project(":graphql-dgs-spring-webmvc-autoconfigure")) - api(project(":graphql-dgs-client")) - api(project(":graphql-error-types")) - - implementation("org.springframework.boot:spring-boot-starter-websocket") - implementation("org.springframework.boot:spring-boot-starter-web") -} diff --git a/graphql-dgs-spring-boot-starter/src/main/kotlin/com/netflix/graphql/dgs/starter/LegacyStarterWarning.kt b/graphql-dgs-spring-boot-starter/src/main/kotlin/com/netflix/graphql/dgs/starter/LegacyStarterWarning.kt deleted file mode 100644 index 7f2869cda..000000000 --- a/graphql-dgs-spring-boot-starter/src/main/kotlin/com/netflix/graphql/dgs/starter/LegacyStarterWarning.kt +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2024 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.starter - -import org.slf4j.Logger -import org.slf4j.LoggerFactory -import org.springframework.boot.context.event.ApplicationStartedEvent -import org.springframework.context.ApplicationListener - -class LegacyStarterWarning : ApplicationListener { - companion object { - private val LOGGER: Logger = LoggerFactory.getLogger(LegacyStarterWarning::class.java) - } - - override fun onApplicationEvent(event: ApplicationStartedEvent) { - LOGGER.warn( - "DEPRECATION WARNING - This project is using the deprecated 'graphql-dgs-spring-boot-starter'. Please switch to 'graphql-dgs-spring-graphql-starter'. For more context: https://netflix.github.io/dgs/spring-graphql-integration", - ) - } -} diff --git a/graphql-dgs-spring-boot-starter/src/main/resources/META-INF/spring.factories b/graphql-dgs-spring-boot-starter/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 05a087bfa..000000000 --- a/graphql-dgs-spring-boot-starter/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1 +0,0 @@ -org.springframework.context.ApplicationListener=com.netflix.graphql.dgs.starter.LegacyStarterWarning \ No newline at end of file diff --git a/graphql-dgs-spring-graphql-example-java-webflux/dependencies.lock b/graphql-dgs-spring-graphql-example-java-webflux/dependencies.lock index 039b9c6b2..dbf66eae7 100644 --- a/graphql-dgs-spring-graphql-example-java-webflux/dependencies.lock +++ b/graphql-dgs-spring-graphql-example-java-webflux/dependencies.lock @@ -132,9 +132,7 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -145,10 +143,7 @@ ] }, "com.netflix.graphql.dgs:graphql-dgs-example-shared": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] + "project": true }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { "project": true, @@ -173,10 +168,8 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -194,13 +187,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ @@ -214,13 +200,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -233,8 +212,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "io.micrometer:micrometer-commons": { @@ -486,10 +464,8 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -782,9 +758,7 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -795,10 +769,7 @@ ] }, "com.netflix.graphql.dgs:graphql-dgs-example-shared": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] + "project": true }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { "project": true, @@ -823,10 +794,8 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -844,13 +813,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ @@ -864,13 +826,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -883,8 +838,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "io.micrometer:micrometer-commons": { @@ -1136,10 +1090,8 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -1482,9 +1434,7 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -1495,10 +1445,7 @@ ] }, "com.netflix.graphql.dgs:graphql-dgs-example-shared": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] + "project": true }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { "project": true, @@ -1523,10 +1470,8 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -1544,13 +1489,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ @@ -1564,13 +1502,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -1583,8 +1514,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "io.micrometer:micrometer-commons": { @@ -1848,10 +1778,8 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -2178,9 +2106,7 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -2191,10 +2117,7 @@ ] }, "com.netflix.graphql.dgs:graphql-dgs-example-shared": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] + "project": true }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { "project": true, @@ -2219,10 +2142,8 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -2240,13 +2161,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ @@ -2260,13 +2174,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -2279,8 +2186,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "io.micrometer:micrometer-commons": { @@ -2544,10 +2450,8 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -2831,8 +2735,7 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -2932,9 +2835,7 @@ "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -2945,10 +2846,7 @@ ] }, "com.netflix.graphql.dgs:graphql-dgs-example-shared": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] + "project": true }, "com.netflix.graphql.dgs:graphql-dgs-extended-scalars": { "project": true, @@ -2982,10 +2880,8 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -3004,14 +2900,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-example-shared", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ @@ -3025,13 +2913,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -3044,8 +2925,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.spectator:spectator-api": { @@ -3071,7 +2951,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.graphql:spring-graphql" ] @@ -3430,12 +3309,6 @@ "org.openjdk.jmh:jmh-core" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.commons:commons-math3": { "locked": "3.6.1", "transitive": [ @@ -3499,7 +3372,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -3517,10 +3389,8 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", @@ -3781,7 +3651,6 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "org.springframework.boot:spring-boot-starter-actuator", "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", @@ -3919,9 +3788,7 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-example-shared", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-webflux", "org.springframework:spring-webflux", @@ -4387,8 +4254,7 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -4487,9 +4353,7 @@ "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -4500,10 +4364,7 @@ ] }, "com.netflix.graphql.dgs:graphql-dgs-example-shared": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] + "project": true }, "com.netflix.graphql.dgs:graphql-dgs-extended-scalars": { "project": true, @@ -4537,10 +4398,8 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -4559,14 +4418,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-example-shared", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ @@ -4580,13 +4431,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -4599,8 +4443,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.spectator:spectator-api": { @@ -4620,7 +4463,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.graphql:spring-graphql" ] @@ -4872,12 +4714,6 @@ "com.jayway.jsonpath:json-path" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.logging.log4j:log4j-api": { "locked": "2.23.1", "transitive": [ @@ -4908,8 +4744,7 @@ "locked": "2.0.21", "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs" ] }, "org.jetbrains.kotlin:kotlin-stdlib": { @@ -4923,10 +4758,8 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "org.jetbrains.kotlin:kotlin-reflect", @@ -5055,7 +4888,6 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "org.springframework.boot:spring-boot-starter-actuator", "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", @@ -5167,9 +4999,7 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-example-shared", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-webflux", "org.springframework:spring-webflux", @@ -5314,9 +5144,7 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -5327,10 +5155,7 @@ ] }, "com.netflix.graphql.dgs:graphql-dgs-example-shared": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] + "project": true }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { "project": true, @@ -5355,10 +5180,8 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -5376,13 +5199,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ @@ -5396,13 +5212,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -5415,8 +5224,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -5805,10 +5613,8 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", @@ -6217,9 +6023,7 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -6230,10 +6034,7 @@ ] }, "com.netflix.graphql.dgs:graphql-dgs-example-shared": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] + "project": true }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { "project": true, @@ -6258,10 +6059,8 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -6279,13 +6078,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ @@ -6299,13 +6091,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -6318,8 +6103,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -6676,10 +6460,8 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk", @@ -7038,8 +6820,7 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -7139,9 +6920,7 @@ "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -7152,10 +6931,7 @@ ] }, "com.netflix.graphql.dgs:graphql-dgs-example-shared": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] + "project": true }, "com.netflix.graphql.dgs:graphql-dgs-extended-scalars": { "project": true, @@ -7189,10 +6965,8 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -7211,14 +6985,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-example-shared", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ @@ -7232,13 +6998,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -7251,8 +7010,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.spectator:spectator-api": { @@ -7278,7 +7036,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.graphql:spring-graphql" ] @@ -7631,12 +7388,6 @@ "org.springframework.boot:spring-boot-starter-test" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.logging.log4j:log4j-api": { "locked": "2.23.1", "transitive": [ @@ -7694,7 +7445,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -7712,10 +7462,8 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", @@ -7947,7 +7695,6 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "org.springframework.boot:spring-boot-starter-actuator", "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", @@ -8085,9 +7832,7 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-example-shared", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-webflux", "org.springframework:spring-webflux", diff --git a/graphql-dgs-spring-graphql-example-java-webflux/src/test/java/com/netflix/graphql/dgs/example/reactive/SubscriptionTest.java b/graphql-dgs-spring-graphql-example-java-webflux/src/test/java/com/netflix/graphql/dgs/example/reactive/SubscriptionTest.java deleted file mode 100644 index de887087c..000000000 --- a/graphql-dgs-spring-graphql-example-java-webflux/src/test/java/com/netflix/graphql/dgs/example/reactive/SubscriptionTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2023 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.example.reactive; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.netflix.graphql.dgs.DgsQueryExecutor; -import com.netflix.graphql.dgs.example.shared.types.Stock; -import com.netflix.graphql.dgs.reactive.DgsReactiveQueryExecutor; -import graphql.ExecutionResult; -import graphql.execution.reactive.SubscriptionPublisher; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; -import org.reactivestreams.Publisher; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import reactor.core.publisher.Mono; -import reactor.test.StepVerifier; - -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; - -@SpringBootTest -@Disabled -public class SubscriptionTest { - - @Autowired - DgsReactiveQueryExecutor queryExecutor; - - ObjectMapper objectMapper = new ObjectMapper(); - - - @Test - void stocks() { - var executionResult = queryExecutor.execute("subscription Stocks { stocks { name, price } }"); - - Publisher publisher = executionResult.flatMap(ExecutionResult::getData); - StepVerifier.withVirtualTime(() -> publisher, 3) - .expectSubscription() - .thenRequest(3) - - .assertNext(result -> assertThat(toStock(result).getPrice()).isEqualTo(500)) - .assertNext(result -> assertThat(toStock(result).getPrice()).isEqualTo(501)) - .assertNext(result -> assertThat(toStock(result).getPrice()).isEqualTo(502)) - .thenCancel() - .verify(); - } - - private Stock toStock(ExecutionResult result) { - Map data = result.getData(); - return objectMapper.convertValue(data.get("stocks"), Stock.class); - } -} diff --git a/graphql-dgs-spring-graphql-example-java/build.gradle.kts b/graphql-dgs-spring-graphql-example-java/build.gradle.kts index 07ed9dd68..5662ac683 100644 --- a/graphql-dgs-spring-graphql-example-java/build.gradle.kts +++ b/graphql-dgs-spring-graphql-example-java/build.gradle.kts @@ -17,7 +17,6 @@ dependencies { implementation(project(":graphql-dgs-example-shared")) - implementation(project(":graphql-dgs-subscriptions-graphql-sse-autoconfigure")) implementation("org.springframework.boot:spring-boot-starter-web") implementation("org.springframework.boot:spring-boot-starter-webflux") implementation("io.projectreactor:reactor-core") diff --git a/graphql-dgs-spring-graphql-example-java/dependencies.lock b/graphql-dgs-spring-graphql-example-java/dependencies.lock index 3b63bc63e..8e5c384a1 100644 --- a/graphql-dgs-spring-graphql-example-java/dependencies.lock +++ b/graphql-dgs-spring-graphql-example-java/dependencies.lock @@ -16,192 +16,2783 @@ } }, "compileClasspath": { + "ch.qos.logback:logback-classic": { + "locked": "1.5.12", + "transitive": [ + "org.springframework.boot:spring-boot-starter-logging" + ] + }, + "ch.qos.logback:logback-core": { + "locked": "1.5.12", + "transitive": [ + "ch.qos.logback:logback-classic" + ] + }, + "com.fasterxml.jackson.core:jackson-annotations": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types" + ] + }, + "com.fasterxml.jackson.core:jackson-core": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom" + ] + }, + "com.fasterxml.jackson.core:jackson-databind": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.module:jackson-module-parameter-names": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson:jackson-bom": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.core:jackson-annotations", + "com.fasterxml.jackson.core:jackson-core", + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names" + ] + }, "com.github.ben-manes.caffeine:caffeine": { "locked": "3.1.8" }, + "com.google.errorprone:error_prone_annotations": { + "locked": "2.21.1", + "transitive": [ + "com.github.ben-manes.caffeine:caffeine" + ] + }, + "com.graphql-java:graphql-java": { + "locked": "22.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-mocking", + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql" + ] + }, + "com.graphql-java:java-dataloader": { + "locked": "3.3.0", + "transitive": [ + "com.graphql-java:graphql-java", + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.jayway.jsonpath:json-path": { + "locked": "2.9.0", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-client": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, "com.netflix.graphql.dgs:graphql-dgs-example-shared": { "project": true }, + "com.netflix.graphql.dgs:graphql-dgs-mocking": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, "com.netflix.graphql.dgs:graphql-dgs-platform": { - "project": true + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-example-shared", + "com.netflix.graphql.dgs:graphql-dgs-mocking", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", + "com.netflix.graphql.dgs:graphql-error-types" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-reactive": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] }, "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer": { - "project": true + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { - "project": true + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure": { - "project": true + "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-error-types": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "io.micrometer:micrometer-commons": { + "locked": "1.13.8", + "transitive": [ + "io.micrometer:micrometer-core", + "io.micrometer:micrometer-jakarta9", + "io.micrometer:micrometer-observation" + ] + }, + "io.micrometer:micrometer-core": { + "locked": "1.13.8", + "transitive": [ + "io.micrometer:micrometer-jakarta9" + ] + }, + "io.micrometer:micrometer-jakarta9": { + "locked": "1.13.8", + "transitive": [ + "org.springframework.boot:spring-boot-starter-actuator" + ] + }, + "io.micrometer:micrometer-observation": { + "locked": "1.13.8", + "transitive": [ + "io.micrometer:micrometer-core", + "io.micrometer:micrometer-jakarta9", + "org.springframework.boot:spring-boot-starter-actuator", + "org.springframework:spring-context", + "org.springframework:spring-web" + ] + }, + "io.netty:netty-buffer": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec", + "io.netty:netty-codec-dns", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-codec-socks", + "io.netty:netty-handler", + "io.netty:netty-handler-proxy", + "io.netty:netty-resolver-dns", + "io.netty:netty-transport", + "io.netty:netty-transport-classes-epoll", + "io.netty:netty-transport-native-epoll", + "io.netty:netty-transport-native-unix-common" + ] + }, + "io.netty:netty-codec": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec-dns", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-codec-socks", + "io.netty:netty-handler", + "io.netty:netty-handler-proxy", + "io.netty:netty-resolver-dns" + ] + }, + "io.netty:netty-codec-dns": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-resolver-dns" + ] + }, + "io.netty:netty-codec-http": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec-http2", + "io.netty:netty-handler-proxy", + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-codec-http2": { + "locked": "4.1.115.Final", + "transitive": [ + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-codec-socks": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-handler-proxy" + ] + }, + "io.netty:netty-common": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-buffer", + "io.netty:netty-codec", + "io.netty:netty-codec-dns", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-codec-socks", + "io.netty:netty-handler", + "io.netty:netty-handler-proxy", + "io.netty:netty-resolver", + "io.netty:netty-resolver-dns", + "io.netty:netty-resolver-dns-classes-macos", + "io.netty:netty-transport", + "io.netty:netty-transport-classes-epoll", + "io.netty:netty-transport-native-epoll", + "io.netty:netty-transport-native-unix-common" + ] + }, + "io.netty:netty-handler": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-resolver-dns", + "io.projectreactor.netty:reactor-netty-core" + ] + }, + "io.netty:netty-handler-proxy": { + "locked": "4.1.115.Final", + "transitive": [ + "io.projectreactor.netty:reactor-netty-core" + ] + }, + "io.netty:netty-resolver": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-handler", + "io.netty:netty-resolver-dns", + "io.netty:netty-transport" + ] + }, + "io.netty:netty-resolver-dns": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-resolver-dns-classes-macos", + "io.projectreactor.netty:reactor-netty-core", + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-resolver-dns-classes-macos": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-resolver-dns-native-macos" + ] + }, + "io.netty:netty-resolver-dns-native-macos": { + "locked": "4.1.115.Final", + "transitive": [ + "io.projectreactor.netty:reactor-netty-core", + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-transport": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec", + "io.netty:netty-codec-dns", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-codec-socks", + "io.netty:netty-handler", + "io.netty:netty-handler-proxy", + "io.netty:netty-resolver-dns", + "io.netty:netty-transport-classes-epoll", + "io.netty:netty-transport-native-epoll", + "io.netty:netty-transport-native-unix-common" + ] + }, + "io.netty:netty-transport-classes-epoll": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-transport-native-epoll" + ] + }, + "io.netty:netty-transport-native-epoll": { + "locked": "4.1.115.Final", + "transitive": [ + "io.projectreactor.netty:reactor-netty-core", + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-transport-native-unix-common": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-handler", + "io.netty:netty-resolver-dns-classes-macos", + "io.netty:netty-transport-classes-epoll", + "io.netty:netty-transport-native-epoll" + ] + }, + "io.projectreactor.netty:reactor-netty-core": { + "locked": "1.1.24", + "transitive": [ + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.projectreactor.netty:reactor-netty-http": { + "locked": "1.1.24", + "transitive": [ + "org.springframework.boot:spring-boot-starter-reactor-netty" + ] + }, + "io.projectreactor:reactor-core": { + "locked": "3.6.12", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-platform", + "io.projectreactor.netty:reactor-netty-core", + "io.projectreactor.netty:reactor-netty-http", + "org.springframework.graphql:spring-graphql", + "org.springframework:spring-webflux" + ] + }, + "jakarta.annotation:jakarta.annotation-api": { + "locked": "2.1.1", + "transitive": [ + "org.springframework.boot:spring-boot-starter", + "org.springframework.boot:spring-boot-starter-tomcat" + ] + }, + "name.nkonev.multipart-spring-graphql:multipart-spring-graphql": { + "locked": "1.5.2" + }, + "org.apache.logging.log4j:log4j-api": { + "locked": "2.23.1", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "org.apache.logging.log4j:log4j-to-slf4j" + ] + }, + "org.apache.logging.log4j:log4j-to-slf4j": { + "locked": "2.23.1", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "org.springframework.boot:spring-boot-starter-logging" + ] + }, + "org.apache.tomcat.embed:tomcat-embed-core": { + "locked": "10.1.33", + "transitive": [ + "org.apache.tomcat.embed:tomcat-embed-websocket", + "org.springframework.boot:spring-boot-starter-tomcat" + ] + }, + "org.apache.tomcat.embed:tomcat-embed-el": { + "locked": "10.1.33", + "transitive": [ + "org.springframework.boot:spring-boot-starter-tomcat" + ] + }, + "org.apache.tomcat.embed:tomcat-embed-websocket": { + "locked": "10.1.33", + "transitive": [ + "org.springframework.boot:spring-boot-starter-tomcat" + ] + }, + "org.checkerframework:checker-qual": { + "locked": "3.37.0", + "transitive": [ + "com.github.ben-manes.caffeine:caffeine" + ] + }, + "org.jetbrains.kotlin:kotlin-stdlib": { + "locked": "2.0.21", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-example-shared", + "com.netflix.graphql.dgs:graphql-dgs-mocking", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", + "com.netflix.graphql.dgs:graphql-error-types" + ] + }, + "org.jetbrains:annotations": { + "locked": "13.0", + "transitive": [ + "org.jetbrains.kotlin:kotlin-stdlib" + ] + }, + "org.reactivestreams:reactive-streams": { + "locked": "1.0.4", + "transitive": [ + "com.graphql-java:graphql-java", + "io.projectreactor:reactor-core" + ] + }, + "org.slf4j:jul-to-slf4j": { + "locked": "2.0.16", + "transitive": [ + "org.springframework.boot:spring-boot-starter-logging" + ] + }, + "org.slf4j:slf4j-api": { + "locked": "2.0.16", + "transitive": [ + "ch.qos.logback:logback-classic", + "com.graphql-java:java-dataloader", + "org.apache.logging.log4j:log4j-to-slf4j", + "org.slf4j:jul-to-slf4j" + ] + }, + "org.springframework.boot:spring-boot": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-actuator", + "org.springframework.boot:spring-boot-actuator-autoconfigure", + "org.springframework.boot:spring-boot-autoconfigure", + "org.springframework.boot:spring-boot-starter" + ] + }, + "org.springframework.boot:spring-boot-actuator": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-actuator-autoconfigure" + ] + }, + "org.springframework.boot:spring-boot-actuator-autoconfigure": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-actuator" + ] + }, + "org.springframework.boot:spring-boot-autoconfigure": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-actuator-autoconfigure", + "org.springframework.boot:spring-boot-starter" + ] + }, + "org.springframework.boot:spring-boot-starter": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-actuator", + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.boot:spring-boot-starter-json", + "org.springframework.boot:spring-boot-starter-web", + "org.springframework.boot:spring-boot-starter-webflux" + ] + }, + "org.springframework.boot:spring-boot-starter-actuator": { + "locked": "3.3.6" + }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "name.nkonev.multipart-spring-graphql:multipart-spring-graphql" + ] + }, + "org.springframework.boot:spring-boot-starter-json": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.boot:spring-boot-starter-web", + "org.springframework.boot:spring-boot-starter-webflux" + ] + }, + "org.springframework.boot:spring-boot-starter-logging": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter" + ] + }, + "org.springframework.boot:spring-boot-starter-reactor-netty": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-webflux" + ] + }, + "org.springframework.boot:spring-boot-starter-tomcat": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-web" + ] + }, + "org.springframework.boot:spring-boot-starter-web": { + "locked": "3.3.6" + }, + "org.springframework.boot:spring-boot-starter-webflux": { + "locked": "3.3.6" + }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, + "org.springframework:spring-aop": { + "locked": "6.1.15", + "transitive": [ + "org.springframework:spring-context", + "org.springframework:spring-webmvc" + ] + }, + "org.springframework:spring-beans": { + "locked": "6.1.15", + "transitive": [ + "org.springframework:spring-aop", + "org.springframework:spring-context", + "org.springframework:spring-web", + "org.springframework:spring-webflux", + "org.springframework:spring-webmvc" + ] + }, + "org.springframework:spring-context": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql", + "org.springframework:spring-webmvc" + ] + }, + "org.springframework:spring-core": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot", + "org.springframework.boot:spring-boot-starter", + "org.springframework:spring-aop", + "org.springframework:spring-beans", + "org.springframework:spring-context", + "org.springframework:spring-expression", + "org.springframework:spring-web", + "org.springframework:spring-webflux", + "org.springframework:spring-webmvc" + ] + }, + "org.springframework:spring-expression": { + "locked": "6.1.15", + "transitive": [ + "org.springframework:spring-context", + "org.springframework:spring-webmvc" + ] + }, + "org.springframework:spring-jcl": { + "locked": "6.1.15", + "transitive": [ + "org.springframework:spring-core" + ] + }, + "org.springframework:spring-web": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot-starter-json", + "org.springframework.boot:spring-boot-starter-web", + "org.springframework.boot:spring-boot-starter-webflux", + "org.springframework:spring-webflux", + "org.springframework:spring-webmvc" + ] + }, + "org.springframework:spring-webflux": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot-starter-webflux" + ] + }, + "org.springframework:spring-webmvc": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot-starter-web" + ] + }, + "org.yaml:snakeyaml": { + "locked": "2.2", + "transitive": [ + "org.springframework.boot:spring-boot-starter" + ] + } + }, + "implementationDependenciesMetadata": { + "ch.qos.logback:logback-classic": { + "locked": "1.5.12", + "transitive": [ + "org.springframework.boot:spring-boot-starter-logging" + ] + }, + "ch.qos.logback:logback-core": { + "locked": "1.5.12", + "transitive": [ + "ch.qos.logback:logback-classic" + ] + }, + "com.fasterxml.jackson.core:jackson-annotations": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types" + ] + }, + "com.fasterxml.jackson.core:jackson-core": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom" + ] + }, + "com.fasterxml.jackson.core:jackson-databind": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.module:jackson-module-parameter-names": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson:jackson-bom": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.core:jackson-annotations", + "com.fasterxml.jackson.core:jackson-core", + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names" + ] + }, + "com.github.ben-manes.caffeine:caffeine": { + "locked": "3.1.8" + }, + "com.google.errorprone:error_prone_annotations": { + "locked": "2.21.1", + "transitive": [ + "com.github.ben-manes.caffeine:caffeine" + ] + }, + "com.graphql-java:graphql-java": { + "locked": "22.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-mocking", + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql" + ] + }, + "com.graphql-java:java-dataloader": { + "locked": "3.3.0", + "transitive": [ + "com.graphql-java:graphql-java", + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.jayway.jsonpath:json-path": { + "locked": "2.9.0", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-client": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-example-shared": { + "project": true + }, + "com.netflix.graphql.dgs:graphql-dgs-mocking": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-platform": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-example-shared", + "com.netflix.graphql.dgs:graphql-dgs-mocking", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", + "com.netflix.graphql.dgs:graphql-error-types" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-reactive": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-error-types": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "io.micrometer:micrometer-commons": { + "locked": "1.13.8", + "transitive": [ + "io.micrometer:micrometer-core", + "io.micrometer:micrometer-jakarta9", + "io.micrometer:micrometer-observation" + ] + }, + "io.micrometer:micrometer-core": { + "locked": "1.13.8", + "transitive": [ + "io.micrometer:micrometer-jakarta9" + ] + }, + "io.micrometer:micrometer-jakarta9": { + "locked": "1.13.8", + "transitive": [ + "org.springframework.boot:spring-boot-starter-actuator" + ] + }, + "io.micrometer:micrometer-observation": { + "locked": "1.13.8", + "transitive": [ + "io.micrometer:micrometer-core", + "io.micrometer:micrometer-jakarta9", + "org.springframework.boot:spring-boot-starter-actuator", + "org.springframework:spring-context", + "org.springframework:spring-web" + ] + }, + "io.netty:netty-buffer": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec", + "io.netty:netty-codec-dns", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-codec-socks", + "io.netty:netty-handler", + "io.netty:netty-handler-proxy", + "io.netty:netty-resolver-dns", + "io.netty:netty-transport", + "io.netty:netty-transport-classes-epoll", + "io.netty:netty-transport-native-epoll", + "io.netty:netty-transport-native-unix-common" + ] + }, + "io.netty:netty-codec": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec-dns", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-codec-socks", + "io.netty:netty-handler", + "io.netty:netty-handler-proxy", + "io.netty:netty-resolver-dns" + ] + }, + "io.netty:netty-codec-dns": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-resolver-dns" + ] + }, + "io.netty:netty-codec-http": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec-http2", + "io.netty:netty-handler-proxy", + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-codec-http2": { + "locked": "4.1.115.Final", + "transitive": [ + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-codec-socks": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-handler-proxy" + ] + }, + "io.netty:netty-common": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-buffer", + "io.netty:netty-codec", + "io.netty:netty-codec-dns", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-codec-socks", + "io.netty:netty-handler", + "io.netty:netty-handler-proxy", + "io.netty:netty-resolver", + "io.netty:netty-resolver-dns", + "io.netty:netty-resolver-dns-classes-macos", + "io.netty:netty-transport", + "io.netty:netty-transport-classes-epoll", + "io.netty:netty-transport-native-epoll", + "io.netty:netty-transport-native-unix-common" + ] + }, + "io.netty:netty-handler": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-resolver-dns", + "io.projectreactor.netty:reactor-netty-core" + ] + }, + "io.netty:netty-handler-proxy": { + "locked": "4.1.115.Final", + "transitive": [ + "io.projectreactor.netty:reactor-netty-core" + ] + }, + "io.netty:netty-resolver": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-handler", + "io.netty:netty-resolver-dns", + "io.netty:netty-transport" + ] + }, + "io.netty:netty-resolver-dns": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-resolver-dns-classes-macos", + "io.projectreactor.netty:reactor-netty-core", + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-resolver-dns-classes-macos": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-resolver-dns-native-macos" + ] + }, + "io.netty:netty-resolver-dns-native-macos": { + "locked": "4.1.115.Final", + "transitive": [ + "io.projectreactor.netty:reactor-netty-core", + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-transport": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec", + "io.netty:netty-codec-dns", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-codec-socks", + "io.netty:netty-handler", + "io.netty:netty-handler-proxy", + "io.netty:netty-resolver-dns", + "io.netty:netty-transport-classes-epoll", + "io.netty:netty-transport-native-epoll", + "io.netty:netty-transport-native-unix-common" + ] + }, + "io.netty:netty-transport-classes-epoll": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-transport-native-epoll" + ] + }, + "io.netty:netty-transport-native-epoll": { + "locked": "4.1.115.Final", + "transitive": [ + "io.projectreactor.netty:reactor-netty-core", + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-transport-native-unix-common": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-handler", + "io.netty:netty-resolver-dns-classes-macos", + "io.netty:netty-transport-classes-epoll", + "io.netty:netty-transport-native-epoll" + ] + }, + "io.projectreactor.netty:reactor-netty-core": { + "locked": "1.1.24", + "transitive": [ + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.projectreactor.netty:reactor-netty-http": { + "locked": "1.1.24", + "transitive": [ + "org.springframework.boot:spring-boot-starter-reactor-netty" + ] + }, + "io.projectreactor:reactor-core": { + "locked": "3.6.12", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-platform", + "io.projectreactor.netty:reactor-netty-core", + "io.projectreactor.netty:reactor-netty-http", + "org.springframework.graphql:spring-graphql", + "org.springframework:spring-webflux" + ] + }, + "jakarta.annotation:jakarta.annotation-api": { + "locked": "2.1.1", + "transitive": [ + "org.springframework.boot:spring-boot-starter", + "org.springframework.boot:spring-boot-starter-tomcat" + ] + }, + "name.nkonev.multipart-spring-graphql:multipart-spring-graphql": { + "locked": "1.5.2" + }, + "org.apache.logging.log4j:log4j-api": { + "locked": "2.23.1", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "org.apache.logging.log4j:log4j-to-slf4j" + ] + }, + "org.apache.logging.log4j:log4j-to-slf4j": { + "locked": "2.23.1", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "org.springframework.boot:spring-boot-starter-logging" + ] + }, + "org.apache.tomcat.embed:tomcat-embed-core": { + "locked": "10.1.33", + "transitive": [ + "org.apache.tomcat.embed:tomcat-embed-websocket", + "org.springframework.boot:spring-boot-starter-tomcat" + ] + }, + "org.apache.tomcat.embed:tomcat-embed-el": { + "locked": "10.1.33", + "transitive": [ + "org.springframework.boot:spring-boot-starter-tomcat" + ] + }, + "org.apache.tomcat.embed:tomcat-embed-websocket": { + "locked": "10.1.33", + "transitive": [ + "org.springframework.boot:spring-boot-starter-tomcat" + ] + }, + "org.checkerframework:checker-qual": { + "locked": "3.37.0", + "transitive": [ + "com.github.ben-manes.caffeine:caffeine" + ] + }, + "org.jetbrains.kotlin:kotlin-stdlib": { + "locked": "2.0.21", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-example-shared", + "com.netflix.graphql.dgs:graphql-dgs-mocking", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", + "com.netflix.graphql.dgs:graphql-error-types" + ] + }, + "org.reactivestreams:reactive-streams": { + "locked": "1.0.4", + "transitive": [ + "com.graphql-java:graphql-java", + "io.projectreactor:reactor-core" + ] + }, + "org.slf4j:jul-to-slf4j": { + "locked": "2.0.16", + "transitive": [ + "org.springframework.boot:spring-boot-starter-logging" + ] + }, + "org.slf4j:slf4j-api": { + "locked": "2.0.16", + "transitive": [ + "ch.qos.logback:logback-classic", + "com.graphql-java:java-dataloader", + "org.apache.logging.log4j:log4j-to-slf4j", + "org.slf4j:jul-to-slf4j" + ] + }, + "org.springframework.boot:spring-boot": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-actuator", + "org.springframework.boot:spring-boot-actuator-autoconfigure", + "org.springframework.boot:spring-boot-autoconfigure", + "org.springframework.boot:spring-boot-starter" + ] + }, + "org.springframework.boot:spring-boot-actuator": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-actuator-autoconfigure" + ] + }, + "org.springframework.boot:spring-boot-actuator-autoconfigure": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-actuator" + ] + }, + "org.springframework.boot:spring-boot-autoconfigure": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-actuator-autoconfigure", + "org.springframework.boot:spring-boot-starter" + ] + }, + "org.springframework.boot:spring-boot-starter": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-actuator", + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.boot:spring-boot-starter-json", + "org.springframework.boot:spring-boot-starter-web", + "org.springframework.boot:spring-boot-starter-webflux" + ] + }, + "org.springframework.boot:spring-boot-starter-actuator": { + "locked": "3.3.6" + }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "name.nkonev.multipart-spring-graphql:multipart-spring-graphql" + ] + }, + "org.springframework.boot:spring-boot-starter-json": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.boot:spring-boot-starter-web", + "org.springframework.boot:spring-boot-starter-webflux" + ] + }, + "org.springframework.boot:spring-boot-starter-logging": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter" + ] + }, + "org.springframework.boot:spring-boot-starter-reactor-netty": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-webflux" + ] + }, + "org.springframework.boot:spring-boot-starter-tomcat": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-web" + ] + }, + "org.springframework.boot:spring-boot-starter-web": { + "locked": "3.3.6" + }, + "org.springframework.boot:spring-boot-starter-webflux": { + "locked": "3.3.6" + }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, + "org.springframework:spring-aop": { + "locked": "6.1.15", + "transitive": [ + "org.springframework:spring-context", + "org.springframework:spring-webmvc" + ] + }, + "org.springframework:spring-beans": { + "locked": "6.1.15", + "transitive": [ + "org.springframework:spring-aop", + "org.springframework:spring-context", + "org.springframework:spring-web", + "org.springframework:spring-webflux", + "org.springframework:spring-webmvc" + ] + }, + "org.springframework:spring-context": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql", + "org.springframework:spring-webmvc" + ] + }, + "org.springframework:spring-core": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot", + "org.springframework.boot:spring-boot-starter", + "org.springframework:spring-aop", + "org.springframework:spring-beans", + "org.springframework:spring-context", + "org.springframework:spring-expression", + "org.springframework:spring-web", + "org.springframework:spring-webflux", + "org.springframework:spring-webmvc" + ] + }, + "org.springframework:spring-expression": { + "locked": "6.1.15", + "transitive": [ + "org.springframework:spring-context", + "org.springframework:spring-webmvc" + ] + }, + "org.springframework:spring-jcl": { + "locked": "6.1.15", + "transitive": [ + "org.springframework:spring-core" + ] + }, + "org.springframework:spring-web": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot-starter-json", + "org.springframework.boot:spring-boot-starter-web", + "org.springframework.boot:spring-boot-starter-webflux", + "org.springframework:spring-webflux", + "org.springframework:spring-webmvc" + ] + }, + "org.springframework:spring-webflux": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot-starter-webflux" + ] + }, + "org.springframework:spring-webmvc": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot-starter-web" + ] + }, + "org.yaml:snakeyaml": { + "locked": "2.2", + "transitive": [ + "org.springframework.boot:spring-boot-starter" + ] + } + }, + "jmh": { + "net.sf.jopt-simple:jopt-simple": { + "locked": "5.0.4", + "transitive": [ + "org.openjdk.jmh:jmh-core" + ] + }, + "org.apache.commons:commons-math3": { + "locked": "3.6.1", + "transitive": [ + "org.openjdk.jmh:jmh-core" + ] + }, + "org.openjdk.jmh:jmh-core": { + "locked": "1.37", + "transitive": [ + "org.openjdk.jmh:jmh-generator-annprocess", + "org.openjdk.jmh:jmh-generator-asm", + "org.openjdk.jmh:jmh-generator-bytecode", + "org.openjdk.jmh:jmh-generator-reflection" + ] + }, + "org.openjdk.jmh:jmh-generator-annprocess": { + "locked": "1.37" + }, + "org.openjdk.jmh:jmh-generator-asm": { + "locked": "1.36", + "transitive": [ + "org.openjdk.jmh:jmh-generator-bytecode" + ] + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.36" + }, + "org.openjdk.jmh:jmh-generator-reflection": { + "locked": "1.36", + "transitive": [ + "org.openjdk.jmh:jmh-generator-asm", + "org.openjdk.jmh:jmh-generator-bytecode" + ] + }, + "org.ow2.asm:asm": { + "locked": "9.0", + "transitive": [ + "org.openjdk.jmh:jmh-generator-asm" + ] + } + }, + "jmhApiDependenciesMetadata": { + "com.netflix.graphql.dgs:graphql-dgs-platform": { + "project": true + }, + "org.jetbrains.kotlin:kotlin-stdlib": { + "locked": "2.0.21" + } + }, + "jmhCompileClasspath": { + "ch.qos.logback:logback-classic": { + "locked": "1.5.12", + "transitive": [ + "org.springframework.boot:spring-boot-starter-logging" + ] + }, + "ch.qos.logback:logback-core": { + "locked": "1.5.12", + "transitive": [ + "ch.qos.logback:logback-classic" + ] + }, + "com.fasterxml.jackson.core:jackson-annotations": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types" + ] + }, + "com.fasterxml.jackson.core:jackson-core": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom" + ] + }, + "com.fasterxml.jackson.core:jackson-databind": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.module:jackson-module-parameter-names": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson:jackson-bom": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.core:jackson-annotations", + "com.fasterxml.jackson.core:jackson-core", + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names" + ] + }, + "com.github.ben-manes.caffeine:caffeine": { + "locked": "3.1.8" + }, + "com.google.errorprone:error_prone_annotations": { + "locked": "2.21.1", + "transitive": [ + "com.github.ben-manes.caffeine:caffeine" + ] + }, + "com.graphql-java:graphql-java": { + "locked": "22.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-mocking", + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql" + ] + }, + "com.graphql-java:java-dataloader": { + "locked": "3.3.0", + "transitive": [ + "com.graphql-java:graphql-java", + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.jayway.jsonpath:json-path": { + "locked": "2.9.0", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-client": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-example-shared": { + "project": true + }, + "com.netflix.graphql.dgs:graphql-dgs-mocking": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-platform": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-example-shared", + "com.netflix.graphql.dgs:graphql-dgs-mocking", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", + "com.netflix.graphql.dgs:graphql-error-types" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-reactive": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-error-types": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "io.micrometer:micrometer-commons": { + "locked": "1.13.8", + "transitive": [ + "io.micrometer:micrometer-core", + "io.micrometer:micrometer-jakarta9", + "io.micrometer:micrometer-observation" + ] + }, + "io.micrometer:micrometer-core": { + "locked": "1.13.8", + "transitive": [ + "io.micrometer:micrometer-jakarta9" + ] + }, + "io.micrometer:micrometer-jakarta9": { + "locked": "1.13.8", + "transitive": [ + "org.springframework.boot:spring-boot-starter-actuator" + ] + }, + "io.micrometer:micrometer-observation": { + "locked": "1.13.8", + "transitive": [ + "io.micrometer:micrometer-core", + "io.micrometer:micrometer-jakarta9", + "org.springframework.boot:spring-boot-starter-actuator", + "org.springframework:spring-context", + "org.springframework:spring-web" + ] + }, + "io.netty:netty-buffer": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec", + "io.netty:netty-codec-dns", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-codec-socks", + "io.netty:netty-handler", + "io.netty:netty-handler-proxy", + "io.netty:netty-resolver-dns", + "io.netty:netty-transport", + "io.netty:netty-transport-classes-epoll", + "io.netty:netty-transport-native-epoll", + "io.netty:netty-transport-native-unix-common" + ] + }, + "io.netty:netty-codec": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec-dns", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-codec-socks", + "io.netty:netty-handler", + "io.netty:netty-handler-proxy", + "io.netty:netty-resolver-dns" + ] + }, + "io.netty:netty-codec-dns": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-resolver-dns" + ] + }, + "io.netty:netty-codec-http": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec-http2", + "io.netty:netty-handler-proxy", + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-codec-http2": { + "locked": "4.1.115.Final", + "transitive": [ + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-codec-socks": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-handler-proxy" + ] + }, + "io.netty:netty-common": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-buffer", + "io.netty:netty-codec", + "io.netty:netty-codec-dns", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-codec-socks", + "io.netty:netty-handler", + "io.netty:netty-handler-proxy", + "io.netty:netty-resolver", + "io.netty:netty-resolver-dns", + "io.netty:netty-resolver-dns-classes-macos", + "io.netty:netty-transport", + "io.netty:netty-transport-classes-epoll", + "io.netty:netty-transport-native-epoll", + "io.netty:netty-transport-native-unix-common" + ] + }, + "io.netty:netty-handler": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-resolver-dns", + "io.projectreactor.netty:reactor-netty-core" + ] + }, + "io.netty:netty-handler-proxy": { + "locked": "4.1.115.Final", + "transitive": [ + "io.projectreactor.netty:reactor-netty-core" + ] + }, + "io.netty:netty-resolver": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-handler", + "io.netty:netty-resolver-dns", + "io.netty:netty-transport" + ] + }, + "io.netty:netty-resolver-dns": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-resolver-dns-classes-macos", + "io.projectreactor.netty:reactor-netty-core", + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-resolver-dns-classes-macos": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-resolver-dns-native-macos" + ] + }, + "io.netty:netty-resolver-dns-native-macos": { + "locked": "4.1.115.Final", + "transitive": [ + "io.projectreactor.netty:reactor-netty-core", + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-transport": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec", + "io.netty:netty-codec-dns", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-codec-socks", + "io.netty:netty-handler", + "io.netty:netty-handler-proxy", + "io.netty:netty-resolver-dns", + "io.netty:netty-transport-classes-epoll", + "io.netty:netty-transport-native-epoll", + "io.netty:netty-transport-native-unix-common" + ] + }, + "io.netty:netty-transport-classes-epoll": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-transport-native-epoll" + ] + }, + "io.netty:netty-transport-native-epoll": { + "locked": "4.1.115.Final", + "transitive": [ + "io.projectreactor.netty:reactor-netty-core", + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-transport-native-unix-common": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-handler", + "io.netty:netty-resolver-dns-classes-macos", + "io.netty:netty-transport-classes-epoll", + "io.netty:netty-transport-native-epoll" + ] + }, + "io.projectreactor.netty:reactor-netty-core": { + "locked": "1.1.24", + "transitive": [ + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.projectreactor.netty:reactor-netty-http": { + "locked": "1.1.24", + "transitive": [ + "org.springframework.boot:spring-boot-starter-reactor-netty" + ] + }, + "io.projectreactor:reactor-core": { + "locked": "3.6.12", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-platform", + "io.projectreactor.netty:reactor-netty-core", + "io.projectreactor.netty:reactor-netty-http", + "org.springframework.graphql:spring-graphql", + "org.springframework:spring-webflux" + ] + }, + "jakarta.annotation:jakarta.annotation-api": { + "locked": "2.1.1", + "transitive": [ + "org.springframework.boot:spring-boot-starter", + "org.springframework.boot:spring-boot-starter-tomcat" + ] + }, + "name.nkonev.multipart-spring-graphql:multipart-spring-graphql": { + "locked": "1.5.2" + }, + "net.sf.jopt-simple:jopt-simple": { + "locked": "5.0.4", + "transitive": [ + "org.openjdk.jmh:jmh-core" + ] + }, + "org.apache.commons:commons-math3": { + "locked": "3.6.1", + "transitive": [ + "org.openjdk.jmh:jmh-core" + ] + }, + "org.apache.logging.log4j:log4j-api": { + "locked": "2.23.1", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "org.apache.logging.log4j:log4j-to-slf4j" + ] + }, + "org.apache.logging.log4j:log4j-to-slf4j": { + "locked": "2.23.1", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "org.springframework.boot:spring-boot-starter-logging" + ] + }, + "org.apache.tomcat.embed:tomcat-embed-core": { + "locked": "10.1.33", + "transitive": [ + "org.apache.tomcat.embed:tomcat-embed-websocket", + "org.springframework.boot:spring-boot-starter-tomcat" + ] + }, + "org.apache.tomcat.embed:tomcat-embed-el": { + "locked": "10.1.33", + "transitive": [ + "org.springframework.boot:spring-boot-starter-tomcat" + ] + }, + "org.apache.tomcat.embed:tomcat-embed-websocket": { + "locked": "10.1.33", + "transitive": [ + "org.springframework.boot:spring-boot-starter-tomcat" + ] + }, + "org.checkerframework:checker-qual": { + "locked": "3.37.0", + "transitive": [ + "com.github.ben-manes.caffeine:caffeine" + ] + }, + "org.jetbrains.kotlin:kotlin-stdlib": { + "locked": "2.0.21", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-example-shared", + "com.netflix.graphql.dgs:graphql-dgs-mocking", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", + "com.netflix.graphql.dgs:graphql-error-types" + ] + }, + "org.jetbrains:annotations": { + "locked": "13.0", + "transitive": [ + "org.jetbrains.kotlin:kotlin-stdlib" + ] + }, + "org.openjdk.jmh:jmh-core": { + "locked": "1.37", + "transitive": [ + "org.openjdk.jmh:jmh-generator-annprocess", + "org.openjdk.jmh:jmh-generator-asm", + "org.openjdk.jmh:jmh-generator-bytecode", + "org.openjdk.jmh:jmh-generator-reflection" + ] + }, + "org.openjdk.jmh:jmh-generator-annprocess": { + "locked": "1.37" + }, + "org.openjdk.jmh:jmh-generator-asm": { + "locked": "1.36", + "transitive": [ + "org.openjdk.jmh:jmh-generator-bytecode" + ] + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.36" + }, + "org.openjdk.jmh:jmh-generator-reflection": { + "locked": "1.36", + "transitive": [ + "org.openjdk.jmh:jmh-generator-asm", + "org.openjdk.jmh:jmh-generator-bytecode" + ] + }, + "org.ow2.asm:asm": { + "locked": "9.0", + "transitive": [ + "org.openjdk.jmh:jmh-generator-asm" + ] + }, + "org.reactivestreams:reactive-streams": { + "locked": "1.0.4", + "transitive": [ + "com.graphql-java:graphql-java", + "io.projectreactor:reactor-core" + ] + }, + "org.slf4j:jul-to-slf4j": { + "locked": "2.0.16", + "transitive": [ + "org.springframework.boot:spring-boot-starter-logging" + ] + }, + "org.slf4j:slf4j-api": { + "locked": "2.0.16", + "transitive": [ + "ch.qos.logback:logback-classic", + "com.graphql-java:java-dataloader", + "org.apache.logging.log4j:log4j-to-slf4j", + "org.slf4j:jul-to-slf4j" + ] + }, + "org.springframework.boot:spring-boot": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-actuator", + "org.springframework.boot:spring-boot-actuator-autoconfigure", + "org.springframework.boot:spring-boot-autoconfigure", + "org.springframework.boot:spring-boot-starter" + ] + }, + "org.springframework.boot:spring-boot-actuator": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-actuator-autoconfigure" + ] + }, + "org.springframework.boot:spring-boot-actuator-autoconfigure": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-actuator" + ] + }, + "org.springframework.boot:spring-boot-autoconfigure": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-actuator-autoconfigure", + "org.springframework.boot:spring-boot-starter" + ] + }, + "org.springframework.boot:spring-boot-starter": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-actuator", + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.boot:spring-boot-starter-json", + "org.springframework.boot:spring-boot-starter-web", + "org.springframework.boot:spring-boot-starter-webflux" + ] + }, + "org.springframework.boot:spring-boot-starter-actuator": { + "locked": "3.3.6" + }, + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "name.nkonev.multipart-spring-graphql:multipart-spring-graphql" + ] + }, + "org.springframework.boot:spring-boot-starter-json": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.boot:spring-boot-starter-web", + "org.springframework.boot:spring-boot-starter-webflux" + ] + }, + "org.springframework.boot:spring-boot-starter-logging": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter" + ] + }, + "org.springframework.boot:spring-boot-starter-reactor-netty": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-webflux" + ] + }, + "org.springframework.boot:spring-boot-starter-tomcat": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-web" + ] + }, + "org.springframework.boot:spring-boot-starter-web": { + "locked": "3.3.6" + }, + "org.springframework.boot:spring-boot-starter-webflux": { + "locked": "3.3.6" + }, + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql" + ] + }, + "org.springframework:spring-aop": { + "locked": "6.1.15", + "transitive": [ + "org.springframework:spring-context", + "org.springframework:spring-webmvc" + ] + }, + "org.springframework:spring-beans": { + "locked": "6.1.15", + "transitive": [ + "org.springframework:spring-aop", + "org.springframework:spring-context", + "org.springframework:spring-web", + "org.springframework:spring-webflux", + "org.springframework:spring-webmvc" + ] + }, + "org.springframework:spring-context": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql", + "org.springframework:spring-webmvc" + ] + }, + "org.springframework:spring-core": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot", + "org.springframework.boot:spring-boot-starter", + "org.springframework:spring-aop", + "org.springframework:spring-beans", + "org.springframework:spring-context", + "org.springframework:spring-expression", + "org.springframework:spring-web", + "org.springframework:spring-webflux", + "org.springframework:spring-webmvc" + ] + }, + "org.springframework:spring-expression": { + "locked": "6.1.15", + "transitive": [ + "org.springframework:spring-context", + "org.springframework:spring-webmvc" + ] + }, + "org.springframework:spring-jcl": { + "locked": "6.1.15", + "transitive": [ + "org.springframework:spring-core" + ] + }, + "org.springframework:spring-web": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot-starter-json", + "org.springframework.boot:spring-boot-starter-web", + "org.springframework.boot:spring-boot-starter-webflux", + "org.springframework:spring-webflux", + "org.springframework:spring-webmvc" + ] + }, + "org.springframework:spring-webflux": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot-starter-webflux" + ] + }, + "org.springframework:spring-webmvc": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot-starter-web" + ] + }, + "org.yaml:snakeyaml": { + "locked": "2.2", + "transitive": [ + "org.springframework.boot:spring-boot-starter" + ] + } + }, + "jmhImplementationDependenciesMetadata": { + "ch.qos.logback:logback-classic": { + "locked": "1.5.12", + "transitive": [ + "org.springframework.boot:spring-boot-starter-logging" + ] + }, + "ch.qos.logback:logback-core": { + "locked": "1.5.12", + "transitive": [ + "ch.qos.logback:logback-classic" + ] + }, + "com.fasterxml.jackson.core:jackson-annotations": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson:jackson-bom", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types" + ] + }, + "com.fasterxml.jackson.core:jackson-core": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom" + ] + }, + "com.fasterxml.jackson.core:jackson-databind": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names", + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson.module:jackson-module-parameter-names": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson:jackson-bom", + "org.springframework.boot:spring-boot-starter-json" + ] + }, + "com.fasterxml.jackson:jackson-bom": { + "locked": "2.17.3", + "transitive": [ + "com.fasterxml.jackson.core:jackson-annotations", + "com.fasterxml.jackson.core:jackson-core", + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", + "com.fasterxml.jackson.module:jackson-module-parameter-names" + ] + }, + "com.github.ben-manes.caffeine:caffeine": { + "locked": "3.1.8" + }, + "com.google.errorprone:error_prone_annotations": { + "locked": "2.21.1", + "transitive": [ + "com.github.ben-manes.caffeine:caffeine" + ] + }, + "com.graphql-java:graphql-java": { + "locked": "22.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-mocking", + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", + "com.netflix.graphql.dgs:graphql-error-types", + "org.springframework.graphql:spring-graphql" + ] + }, + "com.graphql-java:java-dataloader": { + "locked": "3.3.0", + "transitive": [ + "com.graphql-java:graphql-java", + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.jayway.jsonpath:json-path": { + "locked": "2.9.0", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-client": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-example-shared": { + "project": true + }, + "com.netflix.graphql.dgs:graphql-dgs-mocking": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-platform": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-example-shared", + "com.netflix.graphql.dgs:graphql-dgs-mocking", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", + "com.netflix.graphql.dgs:graphql-error-types" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-reactive": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-platform" + ] + }, + "com.netflix.graphql.dgs:graphql-error-types": { + "project": true, + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-platform", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" + ] + }, + "io.micrometer:micrometer-commons": { + "locked": "1.13.8", + "transitive": [ + "io.micrometer:micrometer-core", + "io.micrometer:micrometer-jakarta9", + "io.micrometer:micrometer-observation" + ] + }, + "io.micrometer:micrometer-core": { + "locked": "1.13.8", + "transitive": [ + "io.micrometer:micrometer-jakarta9" + ] + }, + "io.micrometer:micrometer-jakarta9": { + "locked": "1.13.8", + "transitive": [ + "org.springframework.boot:spring-boot-starter-actuator" + ] + }, + "io.micrometer:micrometer-observation": { + "locked": "1.13.8", + "transitive": [ + "io.micrometer:micrometer-core", + "io.micrometer:micrometer-jakarta9", + "org.springframework.boot:spring-boot-starter-actuator", + "org.springframework:spring-context", + "org.springframework:spring-web" + ] + }, + "io.netty:netty-buffer": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec", + "io.netty:netty-codec-dns", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-codec-socks", + "io.netty:netty-handler", + "io.netty:netty-handler-proxy", + "io.netty:netty-resolver-dns", + "io.netty:netty-transport", + "io.netty:netty-transport-classes-epoll", + "io.netty:netty-transport-native-epoll", + "io.netty:netty-transport-native-unix-common" + ] + }, + "io.netty:netty-codec": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec-dns", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-codec-socks", + "io.netty:netty-handler", + "io.netty:netty-handler-proxy", + "io.netty:netty-resolver-dns" + ] + }, + "io.netty:netty-codec-dns": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-resolver-dns" + ] + }, + "io.netty:netty-codec-http": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec-http2", + "io.netty:netty-handler-proxy", + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-codec-http2": { + "locked": "4.1.115.Final", + "transitive": [ + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-codec-socks": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-handler-proxy" + ] + }, + "io.netty:netty-common": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-buffer", + "io.netty:netty-codec", + "io.netty:netty-codec-dns", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-codec-socks", + "io.netty:netty-handler", + "io.netty:netty-handler-proxy", + "io.netty:netty-resolver", + "io.netty:netty-resolver-dns", + "io.netty:netty-resolver-dns-classes-macos", + "io.netty:netty-transport", + "io.netty:netty-transport-classes-epoll", + "io.netty:netty-transport-native-epoll", + "io.netty:netty-transport-native-unix-common" + ] + }, + "io.netty:netty-handler": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-resolver-dns", + "io.projectreactor.netty:reactor-netty-core" + ] + }, + "io.netty:netty-handler-proxy": { + "locked": "4.1.115.Final", + "transitive": [ + "io.projectreactor.netty:reactor-netty-core" + ] + }, + "io.netty:netty-resolver": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-handler", + "io.netty:netty-resolver-dns", + "io.netty:netty-transport" + ] + }, + "io.netty:netty-resolver-dns": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-resolver-dns-classes-macos", + "io.projectreactor.netty:reactor-netty-core", + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-resolver-dns-classes-macos": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-resolver-dns-native-macos" + ] + }, + "io.netty:netty-resolver-dns-native-macos": { + "locked": "4.1.115.Final", + "transitive": [ + "io.projectreactor.netty:reactor-netty-core", + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-transport": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-codec", + "io.netty:netty-codec-dns", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-codec-socks", + "io.netty:netty-handler", + "io.netty:netty-handler-proxy", + "io.netty:netty-resolver-dns", + "io.netty:netty-transport-classes-epoll", + "io.netty:netty-transport-native-epoll", + "io.netty:netty-transport-native-unix-common" + ] + }, + "io.netty:netty-transport-classes-epoll": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-transport-native-epoll" + ] + }, + "io.netty:netty-transport-native-epoll": { + "locked": "4.1.115.Final", + "transitive": [ + "io.projectreactor.netty:reactor-netty-core", + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.netty:netty-transport-native-unix-common": { + "locked": "4.1.115.Final", + "transitive": [ + "io.netty:netty-handler", + "io.netty:netty-resolver-dns-classes-macos", + "io.netty:netty-transport-classes-epoll", + "io.netty:netty-transport-native-epoll" + ] + }, + "io.projectreactor.netty:reactor-netty-core": { + "locked": "1.1.24", + "transitive": [ + "io.projectreactor.netty:reactor-netty-http" + ] + }, + "io.projectreactor.netty:reactor-netty-http": { + "locked": "1.1.24", + "transitive": [ + "org.springframework.boot:spring-boot-starter-reactor-netty" + ] + }, + "io.projectreactor:reactor-core": { + "locked": "3.6.12", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-platform", + "io.projectreactor.netty:reactor-netty-core", + "io.projectreactor.netty:reactor-netty-http", + "org.springframework.graphql:spring-graphql", + "org.springframework:spring-webflux" + ] }, - "io.projectreactor:reactor-core": { - "locked": "3.6.12" + "jakarta.annotation:jakarta.annotation-api": { + "locked": "2.1.1", + "transitive": [ + "org.springframework.boot:spring-boot-starter", + "org.springframework.boot:spring-boot-starter-tomcat" + ] }, "name.nkonev.multipart-spring-graphql:multipart-spring-graphql": { "locked": "1.5.2" }, - "org.jetbrains.kotlin:kotlin-stdlib": { - "locked": "2.0.21" - }, - "org.springframework.boot:spring-boot-starter-actuator": { - "locked": "3.3.6" - }, - "org.springframework.boot:spring-boot-starter-web": { - "locked": "3.3.6" - }, - "org.springframework.boot:spring-boot-starter-webflux": { - "locked": "3.3.6" - } - }, - "implementationDependenciesMetadata": { - "com.github.ben-manes.caffeine:caffeine": { - "locked": "3.1.8" + "net.sf.jopt-simple:jopt-simple": { + "locked": "5.0.4", + "transitive": [ + "org.openjdk.jmh:jmh-core" + ] }, - "com.netflix.graphql.dgs:graphql-dgs-example-shared": { - "project": true + "org.apache.commons:commons-math3": { + "locked": "3.6.1", + "transitive": [ + "org.openjdk.jmh:jmh-core" + ] }, - "com.netflix.graphql.dgs:graphql-dgs-platform": { - "project": true + "org.apache.logging.log4j:log4j-api": { + "locked": "2.23.1", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "org.apache.logging.log4j:log4j-to-slf4j" + ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer": { - "project": true + "org.apache.logging.log4j:log4j-to-slf4j": { + "locked": "2.23.1", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-platform", + "org.springframework.boot:spring-boot-starter-logging" + ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { - "project": true + "org.apache.tomcat.embed:tomcat-embed-core": { + "locked": "10.1.33", + "transitive": [ + "org.apache.tomcat.embed:tomcat-embed-websocket", + "org.springframework.boot:spring-boot-starter-tomcat" + ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure": { - "project": true + "org.apache.tomcat.embed:tomcat-embed-el": { + "locked": "10.1.33", + "transitive": [ + "org.springframework.boot:spring-boot-starter-tomcat" + ] }, - "io.projectreactor:reactor-core": { - "locked": "3.6.12" + "org.apache.tomcat.embed:tomcat-embed-websocket": { + "locked": "10.1.33", + "transitive": [ + "org.springframework.boot:spring-boot-starter-tomcat" + ] }, - "name.nkonev.multipart-spring-graphql:multipart-spring-graphql": { - "locked": "1.5.2" + "org.checkerframework:checker-qual": { + "locked": "3.37.0", + "transitive": [ + "com.github.ben-manes.caffeine:caffeine" + ] }, "org.jetbrains.kotlin:kotlin-stdlib": { - "locked": "2.0.21" - }, - "org.springframework.boot:spring-boot-starter-actuator": { - "locked": "3.3.6" - }, - "org.springframework.boot:spring-boot-starter-web": { - "locked": "3.3.6" + "locked": "2.0.21", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs", + "com.netflix.graphql.dgs:graphql-dgs-client", + "com.netflix.graphql.dgs:graphql-dgs-example-shared", + "com.netflix.graphql.dgs:graphql-dgs-mocking", + "com.netflix.graphql.dgs:graphql-dgs-reactive", + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "com.netflix.graphql.dgs:graphql-dgs-subscription-types", + "com.netflix.graphql.dgs:graphql-error-types" + ] }, - "org.springframework.boot:spring-boot-starter-webflux": { - "locked": "3.3.6" - } - }, - "jmh": { "org.openjdk.jmh:jmh-core": { - "locked": "1.37" + "locked": "1.37", + "transitive": [ + "org.openjdk.jmh:jmh-generator-annprocess", + "org.openjdk.jmh:jmh-generator-asm", + "org.openjdk.jmh:jmh-generator-bytecode", + "org.openjdk.jmh:jmh-generator-reflection" + ] }, "org.openjdk.jmh:jmh-generator-annprocess": { "locked": "1.37" }, + "org.openjdk.jmh:jmh-generator-asm": { + "locked": "1.36", + "transitive": [ + "org.openjdk.jmh:jmh-generator-bytecode" + ] + }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.36" - } - }, - "jmhApiDependenciesMetadata": { - "com.netflix.graphql.dgs:graphql-dgs-platform": { - "project": true - }, - "org.jetbrains.kotlin:kotlin-stdlib": { - "locked": "2.0.21" - } - }, - "jmhCompileClasspath": { - "com.github.ben-manes.caffeine:caffeine": { - "locked": "3.1.8" }, - "com.netflix.graphql.dgs:graphql-dgs-example-shared": { - "project": true - }, - "com.netflix.graphql.dgs:graphql-dgs-platform": { - "project": true + "org.openjdk.jmh:jmh-generator-reflection": { + "locked": "1.36", + "transitive": [ + "org.openjdk.jmh:jmh-generator-asm", + "org.openjdk.jmh:jmh-generator-bytecode" + ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer": { - "project": true + "org.ow2.asm:asm": { + "locked": "9.0", + "transitive": [ + "org.openjdk.jmh:jmh-generator-asm" + ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { - "project": true + "org.reactivestreams:reactive-streams": { + "locked": "1.0.4", + "transitive": [ + "com.graphql-java:graphql-java", + "io.projectreactor:reactor-core" + ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure": { - "project": true + "org.slf4j:jul-to-slf4j": { + "locked": "2.0.16", + "transitive": [ + "org.springframework.boot:spring-boot-starter-logging" + ] }, - "io.projectreactor:reactor-core": { - "locked": "3.6.12" + "org.slf4j:slf4j-api": { + "locked": "2.0.16", + "transitive": [ + "ch.qos.logback:logback-classic", + "com.graphql-java:java-dataloader", + "org.apache.logging.log4j:log4j-to-slf4j", + "org.slf4j:jul-to-slf4j" + ] }, - "name.nkonev.multipart-spring-graphql:multipart-spring-graphql": { - "locked": "1.5.2" + "org.springframework.boot:spring-boot": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-actuator", + "org.springframework.boot:spring-boot-actuator-autoconfigure", + "org.springframework.boot:spring-boot-autoconfigure", + "org.springframework.boot:spring-boot-starter" + ] }, - "org.jetbrains.kotlin:kotlin-stdlib": { - "locked": "2.0.21" + "org.springframework.boot:spring-boot-actuator": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-actuator-autoconfigure" + ] }, - "org.openjdk.jmh:jmh-core": { - "locked": "1.37" + "org.springframework.boot:spring-boot-actuator-autoconfigure": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-actuator" + ] }, - "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.37" + "org.springframework.boot:spring-boot-autoconfigure": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-actuator-autoconfigure", + "org.springframework.boot:spring-boot-starter" + ] }, - "org.openjdk.jmh:jmh-generator-bytecode": { - "locked": "1.36" + "org.springframework.boot:spring-boot-starter": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-actuator", + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.boot:spring-boot-starter-json", + "org.springframework.boot:spring-boot-starter-web", + "org.springframework.boot:spring-boot-starter-webflux" + ] }, "org.springframework.boot:spring-boot-starter-actuator": { "locked": "3.3.6" }, - "org.springframework.boot:spring-boot-starter-web": { - "locked": "3.3.6" + "org.springframework.boot:spring-boot-starter-graphql": { + "locked": "3.3.6", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", + "name.nkonev.multipart-spring-graphql:multipart-spring-graphql" + ] }, - "org.springframework.boot:spring-boot-starter-webflux": { - "locked": "3.3.6" - } - }, - "jmhImplementationDependenciesMetadata": { - "com.github.ben-manes.caffeine:caffeine": { - "locked": "3.1.8" + "org.springframework.boot:spring-boot-starter-json": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.boot:spring-boot-starter-web", + "org.springframework.boot:spring-boot-starter-webflux" + ] }, - "com.netflix.graphql.dgs:graphql-dgs-example-shared": { - "project": true + "org.springframework.boot:spring-boot-starter-logging": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter" + ] + }, + "org.springframework.boot:spring-boot-starter-reactor-netty": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-webflux" + ] + }, + "org.springframework.boot:spring-boot-starter-tomcat": { + "locked": "3.3.6", + "transitive": [ + "org.springframework.boot:spring-boot-starter-web" + ] }, - "com.netflix.graphql.dgs:graphql-dgs-platform": { - "project": true + "org.springframework.boot:spring-boot-starter-web": { + "locked": "3.3.6" }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer": { - "project": true + "org.springframework.boot:spring-boot-starter-webflux": { + "locked": "3.3.6" }, - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter": { - "project": true + "org.springframework.graphql:spring-graphql": { + "locked": "1.3.3", + "transitive": [ + "org.springframework.boot:spring-boot-starter-graphql" + ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure": { - "project": true + "org.springframework:spring-aop": { + "locked": "6.1.15", + "transitive": [ + "org.springframework:spring-context", + "org.springframework:spring-webmvc" + ] }, - "io.projectreactor:reactor-core": { - "locked": "3.6.12" + "org.springframework:spring-beans": { + "locked": "6.1.15", + "transitive": [ + "org.springframework:spring-aop", + "org.springframework:spring-context", + "org.springframework:spring-web", + "org.springframework:spring-webflux", + "org.springframework:spring-webmvc" + ] }, - "name.nkonev.multipart-spring-graphql:multipart-spring-graphql": { - "locked": "1.5.2" + "org.springframework:spring-context": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot", + "org.springframework.graphql:spring-graphql", + "org.springframework:spring-webmvc" + ] }, - "org.jetbrains.kotlin:kotlin-stdlib": { - "locked": "2.0.21" + "org.springframework:spring-core": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot", + "org.springframework.boot:spring-boot-starter", + "org.springframework:spring-aop", + "org.springframework:spring-beans", + "org.springframework:spring-context", + "org.springframework:spring-expression", + "org.springframework:spring-web", + "org.springframework:spring-webflux", + "org.springframework:spring-webmvc" + ] }, - "org.openjdk.jmh:jmh-core": { - "locked": "1.37" + "org.springframework:spring-expression": { + "locked": "6.1.15", + "transitive": [ + "org.springframework:spring-context", + "org.springframework:spring-webmvc" + ] }, - "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.37" + "org.springframework:spring-jcl": { + "locked": "6.1.15", + "transitive": [ + "org.springframework:spring-core" + ] }, - "org.openjdk.jmh:jmh-generator-bytecode": { - "locked": "1.36" + "org.springframework:spring-web": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot-starter-json", + "org.springframework.boot:spring-boot-starter-web", + "org.springframework.boot:spring-boot-starter-webflux", + "org.springframework:spring-webflux", + "org.springframework:spring-webmvc" + ] }, - "org.springframework.boot:spring-boot-starter-actuator": { - "locked": "3.3.6" + "org.springframework:spring-webflux": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot-starter-webflux" + ] }, - "org.springframework.boot:spring-boot-starter-web": { - "locked": "3.3.6" + "org.springframework:spring-webmvc": { + "locked": "6.1.15", + "transitive": [ + "org.springframework.boot:spring-boot-starter-web" + ] }, - "org.springframework.boot:spring-boot-starter-webflux": { - "locked": "3.3.6" + "org.yaml:snakeyaml": { + "locked": "2.2", + "transitive": [ + "org.springframework.boot:spring-boot-starter" + ] } }, "jmhRuntimeClasspath": { @@ -284,9 +2875,7 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -388,11 +2977,7 @@ "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -403,10 +2988,7 @@ ] }, "com.netflix.graphql.dgs:graphql-dgs-example-shared": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] + "project": true }, "com.netflix.graphql.dgs:graphql-dgs-extended-scalars": { "project": true, @@ -440,15 +3022,11 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -466,14 +3044,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-example-shared", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ @@ -500,31 +3070,10 @@ "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure": { - "project": true, - "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, @@ -533,8 +3082,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.spectator:spectator-api": { @@ -560,7 +3108,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.graphql:spring-graphql" ] @@ -837,7 +3384,6 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-example-shared", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", "io.projectreactor.kotlin:reactor-kotlin-extensions", "io.projectreactor.netty:reactor-netty-core", "io.projectreactor.netty:reactor-netty-http", @@ -922,12 +3468,6 @@ "org.openjdk.jmh:jmh-core" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.commons:commons-math3": { "locked": "3.6.1", "transitive": [ @@ -1010,7 +3550,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -1028,15 +3567,11 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", "io.mockk:mockk-agent-jvm", @@ -1289,7 +3824,6 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "org.springframework.boot:spring-boot-actuator-autoconfigure", "org.springframework.boot:spring-boot-starter", "org.springframework.boot:spring-boot-test-autoconfigure" @@ -1298,7 +3832,6 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "org.springframework.boot:spring-boot-starter-actuator", "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", @@ -1462,11 +3995,7 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-example-shared", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-web", "org.springframework.boot:spring-boot-starter-webflux", @@ -1484,8 +4013,6 @@ "org.springframework:spring-webmvc": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "org.springframework.boot:spring-boot-starter-web" ] }, @@ -1942,9 +4469,7 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -2043,11 +4568,7 @@ "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -2058,10 +4579,7 @@ ] }, "com.netflix.graphql.dgs:graphql-dgs-example-shared": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] + "project": true }, "com.netflix.graphql.dgs:graphql-dgs-extended-scalars": { "project": true, @@ -2095,13 +4613,9 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -2119,14 +4633,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-example-shared", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ @@ -2140,31 +4646,10 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure": { - "project": true, - "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, @@ -2173,8 +4658,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.spectator:spectator-api": { @@ -2194,7 +4678,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.graphql:spring-graphql" ] @@ -2411,7 +4894,6 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-example-shared", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", "io.projectreactor.kotlin:reactor-kotlin-extensions", "io.projectreactor.netty:reactor-netty-core", "io.projectreactor.netty:reactor-netty-http", @@ -2448,12 +4930,6 @@ "com.jayway.jsonpath:json-path" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.logging.log4j:log4j-api": { "locked": "2.23.1", "transitive": [ @@ -2503,8 +4979,7 @@ "locked": "2.0.21", "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs" ] }, "org.jetbrains.kotlin:kotlin-stdlib": { @@ -2518,13 +4993,9 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "com.netflix.graphql.dgs:graphql-error-types", "org.jetbrains.kotlin:kotlin-reflect", "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm", @@ -2645,7 +5116,6 @@ "com.netflix.graphql.dgs:graphql-dgs-extended-scalars", "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "org.springframework.boot:spring-boot-actuator-autoconfigure", "org.springframework.boot:spring-boot-starter" ] @@ -2653,7 +5123,6 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "org.springframework.boot:spring-boot-starter-actuator", "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", @@ -2781,11 +5250,7 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-example-shared", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-web", "org.springframework.boot:spring-boot-starter-webflux", @@ -2803,8 +5268,6 @@ "org.springframework:spring-webmvc": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "org.springframework.boot:spring-boot-starter-web" ] }, @@ -2950,9 +5413,7 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -2963,10 +5424,7 @@ ] }, "com.netflix.graphql.dgs:graphql-dgs-example-shared": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] + "project": true }, "com.netflix.graphql.dgs:graphql-dgs-extended-scalars": { "project": true, @@ -2998,14 +5456,11 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -3022,13 +5477,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ @@ -3055,13 +5503,6 @@ "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -3069,19 +5510,12 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -3492,14 +5926,11 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", "io.mockk:mockk-agent-jvm", @@ -3950,9 +6381,7 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -3963,10 +6392,7 @@ ] }, "com.netflix.graphql.dgs:graphql-dgs-example-shared": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] + "project": true }, "com.netflix.graphql.dgs:graphql-dgs-extended-scalars": { "project": true, @@ -3998,14 +6424,11 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -4022,13 +6445,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ @@ -4055,13 +6471,6 @@ "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -4069,19 +6478,12 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.vaadin.external.google:android-json": { @@ -4460,14 +6862,11 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk", "io.mockk:mockk-agent", @@ -4858,9 +7257,7 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -4962,11 +7359,7 @@ "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -4977,10 +7370,7 @@ ] }, "com.netflix.graphql.dgs:graphql-dgs-example-shared": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] + "project": true }, "com.netflix.graphql.dgs:graphql-dgs-extended-scalars": { "project": true, @@ -5014,15 +7404,11 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -5040,14 +7426,6 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-example-shared", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ @@ -5074,31 +7452,10 @@ "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure" - ] - }, - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure": { - "project": true, - "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, @@ -5107,8 +7464,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter" ] }, "com.netflix.spectator:spectator-api": { @@ -5134,7 +7490,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.graphql:spring-graphql" ] @@ -5411,7 +7766,6 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-example-shared", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", "io.projectreactor.kotlin:reactor-kotlin-extensions", "io.projectreactor.netty:reactor-netty-core", "io.projectreactor.netty:reactor-netty-http", @@ -5490,12 +7844,6 @@ "org.springframework.boot:spring-boot-starter-test" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.logging.log4j:log4j-api": { "locked": "2.23.1", "transitive": [ @@ -5572,7 +7920,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -5590,15 +7937,11 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-reactive", "com.netflix.graphql.dgs:graphql-dgs-spring-boot-micrometer", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", "io.mockk:mockk-agent-jvm", @@ -5822,7 +8165,6 @@ "com.netflix.graphql.dgs:graphql-dgs-pagination", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "org.springframework.boot:spring-boot-actuator-autoconfigure", "org.springframework.boot:spring-boot-starter", "org.springframework.boot:spring-boot-test-autoconfigure" @@ -5831,7 +8173,6 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "org.springframework.boot:spring-boot-starter-actuator", "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", @@ -5995,11 +8336,7 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-example-shared", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-web", "org.springframework.boot:spring-boot-starter-webflux", @@ -6017,8 +8354,6 @@ "org.springframework:spring-webmvc": { "locked": "6.1.15", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse", - "com.netflix.graphql.dgs:graphql-dgs-subscriptions-graphql-sse-autoconfigure", "org.springframework.boot:spring-boot-starter-web" ] }, diff --git a/graphql-dgs-spring-graphql-example-java/src/test/java/com/netflix/graphql/dgs/example/datafetcher/GreetingTestWithGraphQlTester.java b/graphql-dgs-spring-graphql-example-java/src/test/java/com/netflix/graphql/dgs/example/datafetcher/GreetingTestWithGraphQlTester.java deleted file mode 100644 index fceff8b42..000000000 --- a/graphql-dgs-spring-graphql-example-java/src/test/java/com/netflix/graphql/dgs/example/datafetcher/GreetingTestWithGraphQlTester.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2023 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.example.datafetcher; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.graphql.ExecutionGraphQlService; -import org.springframework.graphql.test.tester.ExecutionGraphQlServiceTester; - -@SpringBootTest -@Disabled -public class GreetingTestWithGraphQlTester { - @Autowired - ExecutionGraphQlService service; - private ExecutionGraphQlServiceTester graphQlTester; - @BeforeEach - void setUp() { - graphQlTester = ExecutionGraphQlServiceTester.create(service); - } - - @Test - void testSpringDataFetcher() { - graphQlTester.document("query Greetings($name: String){ greetings(name: $name) }").variable("name", "Spring GraphQL").execute() - .path("greetings").entity(String.class).isEqualTo("Hello, Spring GraphQL!"); - } -} diff --git a/graphql-dgs-spring-graphql-starter/build.gradle.kts b/graphql-dgs-spring-graphql-starter/build.gradle.kts index 80b24ee60..ae98fa9aa 100644 --- a/graphql-dgs-spring-graphql-starter/build.gradle.kts +++ b/graphql-dgs-spring-graphql-starter/build.gradle.kts @@ -16,7 +16,6 @@ dependencies { - api(project(":graphql-dgs-spring-boot-oss-autoconfigure")) api(project(":graphql-dgs-spring-graphql")) api(project(":graphql-dgs-client")) api(project(":graphql-dgs-reactive")) diff --git a/graphql-dgs-spring-graphql-starter/dependencies.lock b/graphql-dgs-spring-graphql-starter/dependencies.lock index 5443b1ca0..676310277 100644 --- a/graphql-dgs-spring-graphql-starter/dependencies.lock +++ b/graphql-dgs-spring-graphql-starter/dependencies.lock @@ -113,9 +113,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -138,9 +136,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -151,25 +147,12 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -181,8 +164,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "io.micrometer:micrometer-commons": { @@ -233,9 +215,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -467,9 +447,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -492,9 +470,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -505,25 +481,12 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -535,8 +498,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "io.micrometer:micrometer-commons": { @@ -587,9 +549,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -827,9 +787,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -852,9 +810,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -865,25 +821,12 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -895,8 +838,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "io.micrometer:micrometer-commons": { @@ -947,9 +889,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -1229,9 +1169,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -1254,9 +1192,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -1267,25 +1203,12 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -1297,8 +1220,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "io.micrometer:micrometer-commons": { @@ -1349,9 +1271,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -1583,9 +1503,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -1608,9 +1526,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -1621,25 +1537,12 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -1651,8 +1554,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "io.micrometer:micrometer-commons": { @@ -1715,9 +1617,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -1989,9 +1889,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -2014,9 +1912,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -2027,25 +1923,12 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -2057,8 +1940,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "io.micrometer:micrometer-commons": { @@ -2121,9 +2003,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -2360,8 +2240,7 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -2437,9 +2316,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -2462,9 +2339,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -2476,25 +2351,12 @@ "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -2506,8 +2368,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.vaadin.external.google:android-json": { @@ -2521,7 +2382,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.graphql:spring-graphql" ] @@ -2679,12 +2539,6 @@ "org.openjdk.jmh:jmh-core" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.commons:commons-math3": { "locked": "3.6.1", "transitive": [ @@ -2736,7 +2590,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -2750,9 +2603,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", @@ -2989,7 +2840,6 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test" @@ -3095,9 +2945,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "org.springframework.boot:spring-boot-starter-json", "org.springframework:spring-websocket" ] @@ -3552,8 +3400,7 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -3628,9 +3475,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -3653,9 +3498,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -3667,25 +3510,12 @@ "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -3697,8 +3527,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "io.micrometer:context-propagation": { @@ -3706,7 +3535,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.graphql:spring-graphql" ] @@ -3764,12 +3592,6 @@ "com.jayway.jsonpath:json-path" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.logging.log4j:log4j-api": { "locked": "2.23.1", "transitive": [ @@ -3788,8 +3610,7 @@ "locked": "2.0.21", "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", - "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs" ] }, "org.jetbrains.kotlin:kotlin-stdlib": { @@ -3799,9 +3620,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "org.jetbrains.kotlin:kotlin-reflect", @@ -3906,7 +3725,6 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json" ] @@ -3986,9 +3804,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "org.springframework.boot:spring-boot-starter-json", "org.springframework:spring-websocket" ] @@ -4114,9 +3930,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -4139,9 +3953,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -4152,25 +3964,12 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -4182,8 +3981,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.vaadin.external.google:android-json": { @@ -4364,9 +4162,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", @@ -4720,9 +4516,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -4745,9 +4539,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -4758,25 +4550,12 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -4788,8 +4567,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.vaadin.external.google:android-json": { @@ -4938,9 +4716,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk", @@ -5252,8 +5028,7 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -5329,9 +5104,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, "com.netflix.graphql.dgs:graphql-dgs-client": { @@ -5354,9 +5127,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types" ] @@ -5368,25 +5139,12 @@ "com.netflix.graphql.dgs:graphql-dgs-spring-graphql" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-spring-graphql": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { - "project": true, - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "com.netflix.graphql.dgs:graphql-dgs-subscription-types": { "project": true, "transitive": [ @@ -5398,8 +5156,7 @@ "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.vaadin.external.google:android-json": { @@ -5413,7 +5170,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", "org.springframework.graphql:spring-graphql" ] @@ -5565,12 +5321,6 @@ "org.springframework.boot:spring-boot-starter-test" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.logging.log4j:log4j-api": { "locked": "2.23.1", "transitive": [ @@ -5616,7 +5366,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -5630,9 +5379,7 @@ "com.netflix.graphql.dgs:graphql-dgs-client", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "com.netflix.graphql.dgs:graphql-dgs-subscription-types", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", @@ -5840,7 +5587,6 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test" @@ -5946,9 +5692,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-client", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "com.netflix.graphql.dgs:graphql-dgs-spring-graphql", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "org.springframework.boot:spring-boot-starter-json", "org.springframework:spring-websocket" ] diff --git a/graphql-dgs-spring-graphql-test/src/main/resources/META-INF/spring/com.netflix.graphql.dgs.test.EnableDgsTest.imports b/graphql-dgs-spring-graphql-test/src/main/resources/META-INF/spring/com.netflix.graphql.dgs.test.EnableDgsTest.imports index 154729821..27f7a4535 100644 --- a/graphql-dgs-spring-graphql-test/src/main/resources/META-INF/spring/com.netflix.graphql.dgs.test.EnableDgsTest.imports +++ b/graphql-dgs-spring-graphql-test/src/main/resources/META-INF/spring/com.netflix.graphql.dgs.test.EnableDgsTest.imports @@ -1,4 +1,2 @@ com.netflix.graphql.dgs.springgraphql.autoconfig.DgsSpringGraphQLAutoConfiguration -com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -com.netflix.graphql.dgs.springgraphql.autoconfig.DgsSpringGraphQLSourceAutoConfiguration org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration diff --git a/graphql-dgs-spring-graphql/build.gradle.kts b/graphql-dgs-spring-graphql/build.gradle.kts index cc3f200f3..6c47351d6 100644 --- a/graphql-dgs-spring-graphql/build.gradle.kts +++ b/graphql-dgs-spring-graphql/build.gradle.kts @@ -24,16 +24,19 @@ dependencies { implementation("org.springframework.graphql:spring-graphql") implementation("com.fasterxml.jackson.module:jackson-module-kotlin") implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310") + implementation("io.micrometer:context-propagation") + compileOnly("io.micrometer:micrometer-core") compileOnly("jakarta.servlet:jakarta.servlet-api") + compileOnly("com.github.ben-manes.caffeine:caffeine") compileOnly("org.springframework:spring-webmvc") compileOnly("org.springframework:spring-webflux") compileOnly("org.springframework:spring-test") - testImplementation(project(":graphql-dgs-spring-boot-oss-autoconfigure")) testImplementation("org.springframework.boot:spring-boot-starter-graphql") testImplementation("org.springframework.boot:spring-boot-starter-test") testImplementation("org.springframework.boot:spring-boot-starter-web") testImplementation("org.springframework:spring-webflux") testImplementation("com.github.ben-manes.caffeine:caffeine") + testImplementation(project(":graphql-dgs-spring-graphql-starter-test")) } diff --git a/graphql-dgs-spring-graphql/dependencies.lock b/graphql-dgs-spring-graphql/dependencies.lock index 9b587d617..cc5198de0 100644 --- a/graphql-dgs-spring-graphql/dependencies.lock +++ b/graphql-dgs-spring-graphql/dependencies.lock @@ -63,6 +63,15 @@ "com.fasterxml.jackson.module:jackson-module-kotlin" ] }, + "com.github.ben-manes.caffeine:caffeine": { + "locked": "3.1.8" + }, + "com.google.errorprone:error_prone_annotations": { + "locked": "2.21.1", + "transitive": [ + "com.github.ben-manes.caffeine:caffeine" + ] + }, "com.graphql-java:graphql-java": { "locked": "22.3", "transitive": [ @@ -133,12 +142,17 @@ "io.micrometer:micrometer-commons": { "locked": "1.13.8", "transitive": [ + "io.micrometer:micrometer-core", "io.micrometer:micrometer-observation" ] }, + "io.micrometer:micrometer-core": { + "locked": "1.13.8" + }, "io.micrometer:micrometer-observation": { "locked": "1.13.8", "transitive": [ + "io.micrometer:micrometer-core", "org.springframework:spring-context", "org.springframework:spring-web" ] @@ -154,6 +168,12 @@ "jakarta.servlet:jakarta.servlet-api": { "locked": "6.0.0" }, + "org.checkerframework:checker-qual": { + "locked": "3.37.0", + "transitive": [ + "com.github.ben-manes.caffeine:caffeine" + ] + }, "org.jetbrains.kotlin:kotlin-reflect": { "locked": "2.0.21", "transitive": [ @@ -271,15 +291,29 @@ } }, "compileOnlyDependenciesMetadata": { + "com.github.ben-manes.caffeine:caffeine": { + "locked": "3.1.8" + }, + "com.google.errorprone:error_prone_annotations": { + "locked": "2.21.1", + "transitive": [ + "com.github.ben-manes.caffeine:caffeine" + ] + }, "io.micrometer:micrometer-commons": { "locked": "1.13.8", "transitive": [ + "io.micrometer:micrometer-core", "io.micrometer:micrometer-observation" ] }, + "io.micrometer:micrometer-core": { + "locked": "1.13.8" + }, "io.micrometer:micrometer-observation": { "locked": "1.13.8", "transitive": [ + "io.micrometer:micrometer-core", "org.springframework:spring-context", "org.springframework:spring-web" ] @@ -293,6 +327,12 @@ "jakarta.servlet:jakarta.servlet-api": { "locked": "6.0.0" }, + "org.checkerframework:checker-qual": { + "locked": "3.37.0", + "transitive": [ + "com.github.ben-manes.caffeine:caffeine" + ] + }, "org.reactivestreams:reactive-streams": { "locked": "1.0.4", "transitive": [ @@ -693,6 +733,15 @@ "com.fasterxml.jackson.module:jackson-module-kotlin" ] }, + "com.github.ben-manes.caffeine:caffeine": { + "locked": "3.1.8" + }, + "com.google.errorprone:error_prone_annotations": { + "locked": "2.21.1", + "transitive": [ + "com.github.ben-manes.caffeine:caffeine" + ] + }, "com.graphql-java:graphql-java": { "locked": "22.3", "transitive": [ @@ -763,12 +812,17 @@ "io.micrometer:micrometer-commons": { "locked": "1.13.8", "transitive": [ + "io.micrometer:micrometer-core", "io.micrometer:micrometer-observation" ] }, + "io.micrometer:micrometer-core": { + "locked": "1.13.8" + }, "io.micrometer:micrometer-observation": { "locked": "1.13.8", "transitive": [ + "io.micrometer:micrometer-core", "org.springframework:spring-context", "org.springframework:spring-web" ] @@ -796,6 +850,12 @@ "org.openjdk.jmh:jmh-core" ] }, + "org.checkerframework:checker-qual": { + "locked": "3.37.0", + "transitive": [ + "com.github.ben-manes.caffeine:caffeine" + ] + }, "org.jetbrains.kotlin:kotlin-reflect": { "locked": "2.0.21", "transitive": [ @@ -947,15 +1007,29 @@ } }, "jmhCompileOnlyDependenciesMetadata": { + "com.github.ben-manes.caffeine:caffeine": { + "locked": "3.1.8" + }, + "com.google.errorprone:error_prone_annotations": { + "locked": "2.21.1", + "transitive": [ + "com.github.ben-manes.caffeine:caffeine" + ] + }, "io.micrometer:micrometer-commons": { "locked": "1.13.8", "transitive": [ + "io.micrometer:micrometer-core", "io.micrometer:micrometer-observation" ] }, + "io.micrometer:micrometer-core": { + "locked": "1.13.8" + }, "io.micrometer:micrometer-observation": { "locked": "1.13.8", "transitive": [ + "io.micrometer:micrometer-core", "org.springframework:spring-context", "org.springframework:spring-web" ] @@ -969,6 +1043,12 @@ "jakarta.servlet:jakarta.servlet-api": { "locked": "6.0.0" }, + "org.checkerframework:checker-qual": { + "locked": "3.37.0", + "transitive": [ + "com.github.ben-manes.caffeine:caffeine" + ] + }, "org.reactivestreams:reactive-streams": { "locked": "1.0.4", "transitive": [ @@ -1381,8 +1461,7 @@ "transitive": [ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -1439,7 +1518,8 @@ "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-error-types", - "org.springframework.graphql:spring-graphql" + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test" ] }, "com.graphql-java:java-dataloader": { @@ -1455,16 +1535,15 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.springframework.boot:spring-boot-starter-test" + "org.springframework.boot:spring-boot-starter-test", + "org.springframework.graphql:spring-graphql-test" ] }, "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -1480,8 +1559,8 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -1491,25 +1570,24 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" ] }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.vaadin.external.google:android-json": { @@ -1523,7 +1601,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "org.springframework.graphql:spring-graphql" ] }, @@ -1613,6 +1690,7 @@ "io.projectreactor.kotlin:reactor-kotlin-extensions", "org.jetbrains.kotlinx:kotlinx-coroutines-reactor", "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test", "org.springframework:spring-webflux" ] }, @@ -1681,12 +1759,6 @@ "org.openjdk.jmh:jmh-core" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.commons:commons-math3": { "locked": "3.6.1", "transitive": [ @@ -1763,7 +1835,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -1776,8 +1847,8 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", "io.mockk:mockk-agent-jvm", @@ -2004,6 +2075,7 @@ "org.springframework.boot:spring-boot-autoconfigure": { "locked": "3.3.6", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "org.springframework.boot:spring-boot-starter", "org.springframework.boot:spring-boot-test-autoconfigure" ] @@ -2011,7 +2083,6 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test", @@ -2056,13 +2127,21 @@ "org.springframework.boot:spring-boot-test-autoconfigure": { "locked": "3.3.6", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "org.springframework.boot:spring-boot-starter-test" ] }, "org.springframework.graphql:spring-graphql": { "locked": "1.3.3", "transitive": [ - "org.springframework.boot:spring-boot-starter-graphql" + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.graphql:spring-graphql-test" + ] + }, + "org.springframework.graphql:spring-graphql-test": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" ] }, "org.springframework:spring-aop": { @@ -2088,6 +2167,7 @@ "com.netflix.graphql.dgs:graphql-dgs", "org.springframework.boot:spring-boot", "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test", "org.springframework:spring-webmvc" ] }, @@ -2124,15 +2204,14 @@ "locked": "6.1.15", "transitive": [ "org.springframework.boot:spring-boot-starter-test", - "org.springframework.boot:spring-boot-test" + "org.springframework.boot:spring-boot-test", + "org.springframework.graphql:spring-graphql-test" ] }, "org.springframework:spring-web": { "locked": "6.1.15", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-web", "org.springframework:spring-webflux", @@ -2964,7 +3043,8 @@ "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-error-types", - "org.springframework.graphql:spring-graphql" + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test" ] }, "com.graphql-java:java-dataloader": { @@ -2980,16 +3060,15 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.springframework.boot:spring-boot-starter-test" + "org.springframework.boot:spring-boot-starter-test", + "org.springframework.graphql:spring-graphql-test" ] }, "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -3005,8 +3084,8 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -3016,25 +3095,24 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" ] }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.vaadin.external.google:android-json": { @@ -3125,6 +3203,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test", "org.springframework:spring-webflux" ] }, @@ -3252,8 +3331,8 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", "io.mockk:mockk-agent-jvm", @@ -3435,7 +3514,14 @@ "org.springframework.graphql:spring-graphql": { "locked": "1.3.3", "transitive": [ - "org.springframework.boot:spring-boot-starter-graphql" + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.graphql:spring-graphql-test" + ] + }, + "org.springframework.graphql:spring-graphql-test": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" ] }, "org.springframework:spring-aop": { @@ -3460,6 +3546,7 @@ "transitive": [ "org.springframework.boot:spring-boot", "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test", "org.springframework:spring-webmvc" ] }, @@ -3496,7 +3583,8 @@ "locked": "6.1.15", "transitive": [ "org.springframework.boot:spring-boot-starter-test", - "org.springframework.boot:spring-boot-test" + "org.springframework.boot:spring-boot-test", + "org.springframework.graphql:spring-graphql-test" ] }, "org.springframework:spring-web": { @@ -3628,7 +3716,8 @@ "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-error-types", - "org.springframework.graphql:spring-graphql" + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test" ] }, "com.graphql-java:java-dataloader": { @@ -3644,16 +3733,15 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.springframework.boot:spring-boot-starter-test" + "org.springframework.boot:spring-boot-starter-test", + "org.springframework.graphql:spring-graphql-test" ] }, "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -3669,8 +3757,8 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -3680,25 +3768,24 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" ] }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.vaadin.external.google:android-json": { @@ -3759,6 +3846,7 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test", "org.springframework:spring-webflux" ] }, @@ -3884,8 +3972,8 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk", "io.mockk:mockk-agent", @@ -4055,7 +4143,14 @@ "org.springframework.graphql:spring-graphql": { "locked": "1.3.3", "transitive": [ - "org.springframework.boot:spring-boot-starter-graphql" + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.graphql:spring-graphql-test" + ] + }, + "org.springframework.graphql:spring-graphql-test": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" ] }, "org.springframework:spring-aop": { @@ -4080,6 +4175,7 @@ "transitive": [ "org.springframework.boot:spring-boot", "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test", "org.springframework:spring-webmvc" ] }, @@ -4116,7 +4212,8 @@ "locked": "6.1.15", "transitive": [ "org.springframework.boot:spring-boot-starter-test", - "org.springframework.boot:spring-boot-test" + "org.springframework.boot:spring-boot-test", + "org.springframework.graphql:spring-graphql-test" ] }, "org.springframework:spring-web": { @@ -4220,8 +4317,7 @@ "transitive": [ "com.fasterxml.jackson:jackson-bom", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.fasterxml.jackson.module:jackson-module-parameter-names": { @@ -4278,7 +4374,8 @@ "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-platform", "com.netflix.graphql.dgs:graphql-error-types", - "org.springframework.graphql:spring-graphql" + "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test" ] }, "com.graphql-java:java-dataloader": { @@ -4294,16 +4391,15 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "org.springframework.boot:spring-boot-starter-test" + "org.springframework.boot:spring-boot-starter-test", + "org.springframework.graphql:spring-graphql-test" ] }, "com.netflix.graphql.dgs:graphql-dgs": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-reactive" ] }, "com.netflix.graphql.dgs:graphql-dgs-mocking": { @@ -4319,8 +4415,8 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "com.netflix.graphql.dgs:graphql-error-types" ] }, @@ -4330,25 +4426,24 @@ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc": { + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" ] }, "com.netflix.graphql.dgs:graphql-error-types": { "project": true, "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc" + "com.netflix.graphql.dgs:graphql-dgs-platform" ] }, "com.vaadin.external.google:android-json": { @@ -4362,7 +4457,6 @@ "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-platform", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "org.springframework.graphql:spring-graphql" ] }, @@ -4452,6 +4546,7 @@ "io.projectreactor.kotlin:reactor-kotlin-extensions", "org.jetbrains.kotlinx:kotlinx-coroutines-reactor", "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test", "org.springframework:spring-webflux" ] }, @@ -4514,12 +4609,6 @@ "org.springframework.boot:spring-boot-starter-test" ] }, - "org.apache.commons:commons-lang3": { - "locked": "3.14.0", - "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure" - ] - }, "org.apache.logging.log4j:log4j-api": { "locked": "2.23.1", "transitive": [ @@ -4590,7 +4679,6 @@ "transitive": [ "com.fasterxml.jackson.module:jackson-module-kotlin", "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "io.mockk:mockk-agent-jvm", "io.mockk:mockk-core-jvm", "io.mockk:mockk-dsl-jvm", @@ -4603,8 +4691,8 @@ "com.netflix.graphql.dgs:graphql-dgs", "com.netflix.graphql.dgs:graphql-dgs-mocking", "com.netflix.graphql.dgs:graphql-dgs-reactive", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test", + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "com.netflix.graphql.dgs:graphql-error-types", "io.mockk:mockk-agent-api-jvm", "io.mockk:mockk-agent-jvm", @@ -4802,6 +4890,7 @@ "org.springframework.boot:spring-boot-autoconfigure": { "locked": "3.3.6", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "org.springframework.boot:spring-boot-starter", "org.springframework.boot:spring-boot-test-autoconfigure" ] @@ -4809,7 +4898,6 @@ "org.springframework.boot:spring-boot-starter": { "locked": "3.3.6", "transitive": [ - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", "org.springframework.boot:spring-boot-starter-graphql", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-test", @@ -4854,13 +4942,21 @@ "org.springframework.boot:spring-boot-test-autoconfigure": { "locked": "3.3.6", "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-test", "org.springframework.boot:spring-boot-starter-test" ] }, "org.springframework.graphql:spring-graphql": { "locked": "1.3.3", "transitive": [ - "org.springframework.boot:spring-boot-starter-graphql" + "org.springframework.boot:spring-boot-starter-graphql", + "org.springframework.graphql:spring-graphql-test" + ] + }, + "org.springframework.graphql:spring-graphql-test": { + "locked": "1.3.3", + "transitive": [ + "com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter-test" ] }, "org.springframework:spring-aop": { @@ -4886,6 +4982,7 @@ "com.netflix.graphql.dgs:graphql-dgs", "org.springframework.boot:spring-boot", "org.springframework.graphql:spring-graphql", + "org.springframework.graphql:spring-graphql-test", "org.springframework:spring-webmvc" ] }, @@ -4922,15 +5019,14 @@ "locked": "6.1.15", "transitive": [ "org.springframework.boot:spring-boot-starter-test", - "org.springframework.boot:spring-boot-test" + "org.springframework.boot:spring-boot-test", + "org.springframework.graphql:spring-graphql-test" ] }, "org.springframework:spring-web": { "locked": "6.1.15", "transitive": [ "com.netflix.graphql.dgs:graphql-dgs", - "com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure", - "com.netflix.graphql.dgs:graphql-dgs-spring-webmvc", "org.springframework.boot:spring-boot-starter-json", "org.springframework.boot:spring-boot-starter-web", "org.springframework:spring-webflux", diff --git a/graphql-dgs/src/main/kotlin/com/netflix/graphql/dgs/internal/CookieValueResolver.kt b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/ReloadSchemaIndicator.kt similarity index 67% rename from graphql-dgs/src/main/kotlin/com/netflix/graphql/dgs/internal/CookieValueResolver.kt rename to graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/ReloadSchemaIndicator.kt index 1c5f4a151..fc5800463 100644 --- a/graphql-dgs/src/main/kotlin/com/netflix/graphql/dgs/internal/CookieValueResolver.kt +++ b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/ReloadSchemaIndicator.kt @@ -1,5 +1,5 @@ /* - * Copyright 2021 Netflix, Inc. + * Copyright 2024 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,9 @@ * limitations under the License. */ -package com.netflix.graphql.dgs.internal +package com.netflix.graphql.dgs -@Deprecated("Cookie resolving is now handled by ArgumentResolvers") -interface CookieValueResolver { - fun getCookieValue( - name: String, - requestData: DgsRequestData?, - ): String? +@FunctionalInterface +fun interface ReloadSchemaIndicator { + fun reloadSchema(): Boolean } diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/apq/AutomatedPersistedQueryCacheAdapter.kt b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/apq/AutomatedPersistedQueryCacheAdapter.kt similarity index 94% rename from graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/apq/AutomatedPersistedQueryCacheAdapter.kt rename to graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/apq/AutomatedPersistedQueryCacheAdapter.kt index df2b09a39..e7c3c4059 100644 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/apq/AutomatedPersistedQueryCacheAdapter.kt +++ b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/apq/AutomatedPersistedQueryCacheAdapter.kt @@ -22,7 +22,6 @@ import graphql.execution.preparsed.persisted.PersistedQueryCache import graphql.execution.preparsed.persisted.PersistedQueryCacheMiss import graphql.execution.preparsed.persisted.PersistedQueryNotFound import graphql.execution.preparsed.persisted.PersistedQuerySupport -import org.apache.commons.lang3.StringUtils import java.util.concurrent.CompletableFuture import java.util.function.Supplier @@ -47,7 +46,7 @@ abstract class AutomatedPersistedQueryCacheAdapter : PersistedQueryCache { getFromCache(key) { // Get the query from the execution input. Make sure it's not null, empty or the APQ marker. val queryText = executionInput.query - if (StringUtils.isBlank(queryText) || queryText.equals(PersistedQuerySupport.PERSISTED_QUERY_MARKER)) { + if (queryText.isNullOrBlank() || queryText.equals(PersistedQuerySupport.PERSISTED_QUERY_MARKER)) { throw PersistedQueryNotFound(persistedQueryId) } return@getFromCache onCacheMiss.apply(queryText) diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/apq/AutomatedPersistedQueryCaffeineCache.kt b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/apq/AutomatedPersistedQueryCaffeineCache.kt similarity index 100% rename from graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/apq/AutomatedPersistedQueryCaffeineCache.kt rename to graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/apq/AutomatedPersistedQueryCaffeineCache.kt diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/apq/DgsAPQSupportAutoConfiguration.kt b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/apq/DgsAPQSupportAutoConfiguration.kt similarity index 96% rename from graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/apq/DgsAPQSupportAutoConfiguration.kt rename to graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/apq/DgsAPQSupportAutoConfiguration.kt index 79053e40c..eb7d58168 100644 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/apq/DgsAPQSupportAutoConfiguration.kt +++ b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/apq/DgsAPQSupportAutoConfiguration.kt @@ -25,7 +25,6 @@ import graphql.execution.preparsed.persisted.ApolloPersistedQuerySupport import graphql.execution.preparsed.persisted.PersistedQueryCache import io.micrometer.core.instrument.MeterRegistry import io.micrometer.core.instrument.binder.cache.CaffeineCacheMetrics -import org.apache.commons.lang3.StringUtils import org.springframework.beans.factory.annotation.Qualifier import org.springframework.boot.autoconfigure.AutoConfiguration import org.springframework.boot.autoconfigure.condition.ConditionalOnBean @@ -55,7 +54,7 @@ open class DgsAPQSupportAutoConfiguration { @ConditionalOnBean(ApolloPersistedQuerySupport::class) open fun apolloAPQQueryValueCustomizer(): QueryValueCustomizer = QueryValueCustomizer { query -> - if (StringUtils.isBlank(query)) { + if (query.isNullOrBlank()) { ApolloPersistedQuerySupport.PERSISTED_QUERY_MARKER } else { query @@ -74,7 +73,7 @@ open class DgsAPQSupportAutoConfiguration { @Bean(name = [BEAN_APQ_CAFFEINE_CACHE_NAME]) @ConditionalOnMissingBean(name = [BEAN_APQ_CAFFEINE_CACHE_NAME]) open fun apqCaffeineCache(properties: DgsAPQSupportProperties): Cache = - if (StringUtils.isNotBlank(properties.defaultCache.caffeineSpec)) { + if (properties.defaultCache.caffeineSpec.isNotBlank()) { Caffeine.from(CaffeineSpec.parse(properties.defaultCache.caffeineSpec)).build() } else { Caffeine diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/apq/DgsAPQSupportProperties.kt b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/apq/DgsAPQSupportProperties.kt similarity index 100% rename from graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/apq/DgsAPQSupportProperties.kt rename to graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/apq/DgsAPQSupportProperties.kt diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/autoconfig/DgsConfigurationProperties.kt b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/autoconfig/DgsConfigurationProperties.kt similarity index 83% rename from graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/autoconfig/DgsConfigurationProperties.kt rename to graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/autoconfig/DgsConfigurationProperties.kt index 7aaa9f7c2..8946174cf 100644 --- a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/autoconfig/DgsConfigurationProperties.kt +++ b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/autoconfig/DgsConfigurationProperties.kt @@ -31,6 +31,7 @@ data class DgsConfigurationProperties( @DefaultValue("false") val enableEntityFetcherCustomScalarParsing: Boolean, val preparsedDocumentProvider: DgsPreparsedDocumentProviderConfigurationProperties = DgsPreparsedDocumentProviderConfigurationProperties(), + val introspection: DgsIntrospectionConfigurationProperties = DgsIntrospectionConfigurationProperties(), ) { data class DgsPreparsedDocumentProviderConfigurationProperties( val enabled: Boolean = false, @@ -39,6 +40,12 @@ data class DgsConfigurationProperties( val cacheValidityDuration: String = "PT1H", ) + data class DgsIntrospectionConfigurationProperties( + /** Due to legacy reasons, SDL comments (i.e. # comments) are shown in introspection queries by default. + * This property toggles that visibility. */ + val showSdlComments: Boolean = true, + ) + companion object { const val PREFIX: String = "dgs.graphql" } diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/autoconfig/DgsDataloaderConfigurationProperties.kt b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/autoconfig/DgsDataloaderConfigurationProperties.kt similarity index 100% rename from graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/autoconfig/DgsDataloaderConfigurationProperties.kt rename to graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/autoconfig/DgsDataloaderConfigurationProperties.kt diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/autoconfig/DgsInputArgumentConfiguration.kt b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/autoconfig/DgsInputArgumentConfiguration.kt similarity index 100% rename from graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/autoconfig/DgsInputArgumentConfiguration.kt rename to graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/autoconfig/DgsInputArgumentConfiguration.kt diff --git a/graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/diagnostics/SchemaFailureAnalyzer.kt b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/diagnostics/SchemaFailureAnalyzer.kt similarity index 100% rename from graphql-dgs-spring-boot-oss-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/diagnostics/SchemaFailureAnalyzer.kt rename to graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/diagnostics/SchemaFailureAnalyzer.kt diff --git a/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/springgraphql/ReloadableGraphQLSource.kt b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/springgraphql/ReloadableGraphQLSource.kt index 0d9fc69d2..97649661e 100644 --- a/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/springgraphql/ReloadableGraphQLSource.kt +++ b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/springgraphql/ReloadableGraphQLSource.kt @@ -16,7 +16,7 @@ package com.netflix.graphql.dgs.springgraphql -import com.netflix.graphql.dgs.internal.DefaultDgsQueryExecutor +import com.netflix.graphql.dgs.ReloadSchemaIndicator import graphql.GraphQL import graphql.schema.GraphQLSchema import org.slf4j.Logger @@ -25,7 +25,7 @@ import org.springframework.graphql.execution.GraphQlSource class ReloadableGraphQLSource( private var graphQlSourceBuilder: GraphQlSource.Builder<*>, - private val reloadSchemaIndicator: DefaultDgsQueryExecutor.ReloadSchemaIndicator, + private val reloadSchemaIndicator: ReloadSchemaIndicator, ) : GraphQlSource { private var graphQlSource: GraphQlSource? = null diff --git a/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsGraphQLConfigurationProperties.kt b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsGraphQLConfigurationProperties.kt deleted file mode 100644 index e61d96238..000000000 --- a/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsGraphQLConfigurationProperties.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2024 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.springgraphql.autoconfig - -import com.netflix.graphql.dgs.springgraphql.autoconfig.DgsGraphQLConfigurationProperties.Companion.PREFIX -import org.springframework.boot.context.properties.ConfigurationProperties - -@ConfigurationProperties(prefix = PREFIX) -data class DgsGraphQLConfigurationProperties( - val introspection: DgsIntrospectionConfigurationProperties = DgsIntrospectionConfigurationProperties(), -) { - data class DgsIntrospectionConfigurationProperties( - /** Due to legacy reasons, SDL comments (i.e. # comments) are shown in introspection queries by default. - * This property toggles that visibility. */ - val showSdlComments: Boolean = true, - ) - - companion object { - const val PREFIX: String = "dgs.graphql" - } -} diff --git a/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsSpringGraphQLAutoConfiguration.kt b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsSpringGraphQLAutoConfiguration.kt index 276a39336..37774334e 100644 --- a/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsSpringGraphQLAutoConfiguration.kt +++ b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsSpringGraphQLAutoConfiguration.kt @@ -16,47 +16,98 @@ package com.netflix.graphql.dgs.springgraphql.autoconfig +import com.netflix.graphql.dgs.DataLoaderInstrumentationExtensionProvider import com.netflix.graphql.dgs.DgsComponent +import com.netflix.graphql.dgs.DgsDataLoaderCustomizer +import com.netflix.graphql.dgs.DgsDataLoaderInstrumentation +import com.netflix.graphql.dgs.DgsDataLoaderOptionsProvider +import com.netflix.graphql.dgs.DgsDefaultPreparsedDocumentProvider +import com.netflix.graphql.dgs.DgsFederationResolver import com.netflix.graphql.dgs.DgsQueryExecutor import com.netflix.graphql.dgs.DgsRuntimeWiring import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry +import com.netflix.graphql.dgs.ReloadSchemaIndicator +import com.netflix.graphql.dgs.autoconfig.DgsConfigurationProperties +import com.netflix.graphql.dgs.autoconfig.DgsDataloaderConfigurationProperties +import com.netflix.graphql.dgs.autoconfig.DgsInputArgumentConfiguration +import com.netflix.graphql.dgs.context.DgsCustomContextBuilder +import com.netflix.graphql.dgs.context.DgsCustomContextBuilderWithRequest import com.netflix.graphql.dgs.context.GraphQLContextContributor +import com.netflix.graphql.dgs.context.GraphQLContextContributorInstrumentation +import com.netflix.graphql.dgs.exceptions.DefaultDataFetcherExceptionHandler import com.netflix.graphql.dgs.internal.* import com.netflix.graphql.dgs.internal.method.ArgumentResolver +import com.netflix.graphql.dgs.internal.method.MethodDataFetcherFactory import com.netflix.graphql.dgs.mvc.internal.method.HandlerMethodArgumentResolverAdapter import com.netflix.graphql.dgs.reactive.DgsReactiveCustomContextBuilderWithRequest import com.netflix.graphql.dgs.reactive.DgsReactiveQueryExecutor import com.netflix.graphql.dgs.reactive.internal.DefaultDgsReactiveGraphQLContextBuilder import com.netflix.graphql.dgs.reactive.internal.method.SyncHandlerMethodArgumentResolverAdapter +import com.netflix.graphql.dgs.springgraphql.DgsGraphQLSourceBuilder +import com.netflix.graphql.dgs.springgraphql.ReloadableGraphQLSource import com.netflix.graphql.dgs.springgraphql.SpringGraphQLDgsQueryExecutor import com.netflix.graphql.dgs.springgraphql.SpringGraphQLDgsReactiveQueryExecutor import com.netflix.graphql.dgs.springgraphql.webflux.DgsWebFluxGraphQLInterceptor import com.netflix.graphql.dgs.springgraphql.webmvc.DgsWebMvcGraphQLInterceptor +import com.netflix.graphql.mocking.MockProvider +import graphql.GraphQLError import graphql.execution.DataFetcherExceptionHandler +import graphql.execution.DataFetcherExceptionHandlerParameters import graphql.execution.ExecutionStrategy +import graphql.execution.instrumentation.Instrumentation import graphql.execution.preparsed.PreparsedDocumentProvider import graphql.introspection.Introspection +import graphql.schema.DataFetcherFactory +import graphql.schema.DataFetchingEnvironment +import graphql.schema.GraphQLCodeRegistry import graphql.schema.idl.RuntimeWiring import graphql.schema.idl.TypeDefinitionRegistry +import io.micrometer.context.ContextRegistry +import io.micrometer.context.ContextSnapshotFactory +import io.micrometer.context.integration.Slf4jThreadLocalAccessor import org.reactivestreams.Publisher +import org.slf4j.Logger +import org.slf4j.LoggerFactory import org.springframework.beans.factory.ObjectProvider import org.springframework.beans.factory.annotation.Qualifier import org.springframework.beans.factory.config.ConfigurableBeanFactory import org.springframework.boot.autoconfigure.AutoConfiguration -import org.springframework.boot.autoconfigure.AutoConfigureBefore +import org.springframework.boot.autoconfigure.ImportAutoConfiguration import org.springframework.boot.autoconfigure.condition.ConditionalOnClass import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty +import org.springframework.boot.autoconfigure.condition.ConditionalOnThreading import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication +import org.springframework.boot.autoconfigure.graphql.GraphQlProperties import org.springframework.boot.autoconfigure.graphql.GraphQlSourceBuilderCustomizer +import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration +import org.springframework.boot.autoconfigure.thread.Threading import org.springframework.boot.context.properties.EnableConfigurationProperties +import org.springframework.context.ApplicationContext import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration +import org.springframework.core.DefaultParameterNameDiscoverer +import org.springframework.core.PriorityOrdered import org.springframework.core.ReactiveAdapterRegistry +import org.springframework.core.annotation.Order import org.springframework.core.env.Environment +import org.springframework.core.task.AsyncTaskExecutor +import org.springframework.core.task.SimpleAsyncTaskExecutor +import org.springframework.core.task.support.ContextPropagatingTaskDecorator import org.springframework.graphql.ExecutionGraphQlService -import org.springframework.graphql.execution.* +import org.springframework.graphql.execution.ConnectionTypeDefinitionConfigurer +import org.springframework.graphql.execution.DataFetcherExceptionResolver +import org.springframework.graphql.execution.DataFetcherExceptionResolverAdapter +import org.springframework.graphql.execution.GraphQlSource +import org.springframework.graphql.execution.RuntimeWiringConfigurer +import org.springframework.graphql.execution.SchemaReport +import org.springframework.graphql.execution.SelfDescribingDataFetcher +import org.springframework.graphql.execution.SubscriptionExceptionResolver +import org.springframework.http.HttpHeaders +import org.springframework.mock.web.MockHttpServletRequest import org.springframework.web.bind.support.WebDataBinderFactory +import org.springframework.web.context.request.NativeWebRequest +import org.springframework.web.context.request.WebRequest import org.springframework.web.filter.reactive.ServerWebExchangeContextFilter import org.springframework.web.method.annotation.RequestHeaderMapMethodArgumentResolver import org.springframework.web.method.annotation.RequestHeaderMethodArgumentResolver @@ -68,17 +119,321 @@ import org.springframework.web.reactive.result.method.annotation.CookieValueMeth import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter import org.springframework.web.servlet.mvc.method.annotation.ServletCookieValueMethodArgumentResolver import org.springframework.web.servlet.mvc.method.annotation.ServletRequestDataBinderFactory -import java.util.Optional +import java.time.Duration +import java.util.* +import java.util.concurrent.Executors +import java.util.concurrent.ScheduledExecutorService +import java.util.function.Consumer +import java.util.stream.Collectors /** * Framework auto configuration based on open source Spring only, without Netflix integrations. * This does NOT have logging, tracing, metrics and security integration. */ @Suppress("SpringJavaInjectionPointsAutowiringInspection") -@AutoConfiguration -@AutoConfigureBefore(name = ["com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration"]) -@EnableConfigurationProperties(DgsSpringGraphQLConfigurationProperties::class, DgsGraphQLConfigurationProperties::class) -open class DgsSpringGraphQLAutoConfiguration { +@AutoConfiguration( + beforeName = ["org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration"], + afterName = ["org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration"], +) +@EnableConfigurationProperties( + DgsSpringGraphQLConfigurationProperties::class, + DgsConfigurationProperties::class, + DgsDataloaderConfigurationProperties::class, +) +@ImportAutoConfiguration(classes = [JacksonAutoConfiguration::class, DgsInputArgumentConfiguration::class]) +open class DgsSpringGraphQLAutoConfiguration( + private val configProps: DgsConfigurationProperties, + private val dataloaderConfigProps: DgsDataloaderConfigurationProperties, +) { + companion object { + const val AUTO_CONF_PREFIX = "dgs.graphql" + private val LOG: Logger = LoggerFactory.getLogger(DgsSpringGraphQLAutoConfiguration::class.java) + } + + @Bean + @Order(PriorityOrdered.HIGHEST_PRECEDENCE) + open fun graphQLContextContributionInstrumentation( + graphQLContextContributors: ObjectProvider, + ): Instrumentation = GraphQLContextContributorInstrumentation(graphQLContextContributors.orderedStream().toList()) + + @Bean + open fun graphqlJavaErrorInstrumentation(): Instrumentation = GraphQLJavaErrorInstrumentation() + + @Bean + @ConditionalOnMissingBean + open fun defaultQueryValueCustomizer(): QueryValueCustomizer = QueryValueCustomizer { a -> a } + + @Bean + @ConditionalOnMissingBean + open fun dgsDataLoaderOptionsProvider(): DgsDataLoaderOptionsProvider = DefaultDataLoaderOptionsProvider() + + @Bean(destroyMethod = "shutdown") + @ConditionalOnMissingBean(name = ["dgsScheduledExecutorService"]) + @Qualifier("dgsScheduledExecutorService") + open fun dgsScheduledExecutorService(): ScheduledExecutorService = Executors.newSingleThreadScheduledExecutor() + + @Bean + @ConditionalOnProperty( + prefix = "${AUTO_CONF_PREFIX}.convertAllDataLoadersToWithContext", + name = ["enabled"], + havingValue = "true", + matchIfMissing = true, + ) + @Order(0) + open fun dgsWrapWithContextDataLoaderCustomizer(): DgsWrapWithContextDataLoaderCustomizer = DgsWrapWithContextDataLoaderCustomizer() + + @Bean + @Order(100) + open fun dgsDataLoaderInstrumentationDataLoaderCustomizer( + instrumentations: List, + ): DgsDataLoaderInstrumentationDataLoaderCustomizer = DgsDataLoaderInstrumentationDataLoaderCustomizer(instrumentations) + + @Bean + open fun dgsDataLoaderProvider( + applicationContext: ApplicationContext, + dataloaderOptionProvider: DgsDataLoaderOptionsProvider, + @Qualifier("dgsScheduledExecutorService") dgsScheduledExecutorService: ScheduledExecutorService, + extensionProviders: List, + customizers: List, + ): DgsDataLoaderProvider = + DgsDataLoaderProvider( + applicationContext = applicationContext, + extensionProviders = extensionProviders, + dataLoaderOptionsProvider = dataloaderOptionProvider, + scheduledExecutorService = dgsScheduledExecutorService, + scheduleDuration = dataloaderConfigProps.scheduleDuration, + enableTickerMode = dataloaderConfigProps.tickerModeEnabled, + customizers = customizers, + ) + + @Bean + open fun entityFetcherRegistry(): EntityFetcherRegistry = EntityFetcherRegistry() + + @Bean + @ConditionalOnMissingBean + open fun dataFetcherExceptionHandler(): DataFetcherExceptionHandler = DefaultDataFetcherExceptionHandler() + + @Bean + @ConditionalOnProperty( + prefix = "${AUTO_CONF_PREFIX}.preparsedDocumentProvider", + name = ["enabled"], + havingValue = "true", + matchIfMissing = false, + ) + @ConditionalOnMissingBean + open fun preparsedDocumentProvider(configProps: DgsConfigurationProperties): PreparsedDocumentProvider = + DgsDefaultPreparsedDocumentProvider( + configProps.preparsedDocumentProvider.maximumCacheSize, + Duration.parse(configProps.preparsedDocumentProvider.cacheValidityDuration), + ) + + @Bean + @ConditionalOnMissingBean + open fun graphQLContextBuilder( + dgsCustomContextBuilder: Optional>, + dgsCustomContextBuilderWithRequest: Optional>, + ): DefaultDgsGraphQLContextBuilder = DefaultDgsGraphQLContextBuilder(dgsCustomContextBuilder, dgsCustomContextBuilderWithRequest) + + /** + * Used by the [DefaultDgsQueryExecutor], it controls if, and when, such executor should reload the schema. + * This implementation will return either the boolean value of the `dgs.reload` flag + * or `true` if the `laptop` profile is an active Spring Boot profiles. + *

+ * You can provide a bean of type [ReloadSchemaIndicator] if you want to control when the + * [DefaultDgsQueryExecutor] should reload the schema. + * + * @implSpec the implementation of such bean should be thread-safe. + */ + @Bean + @ConditionalOnMissingBean + open fun defaultReloadSchemaIndicator(environment: Environment): ReloadSchemaIndicator { + val isLaptopProfile = environment.activeProfiles.contains("laptop") + val hotReloadSetting = environment.getProperty("dgs.reload", Boolean::class.java, isLaptopProfile) + + return ReloadSchemaIndicator { + hotReloadSetting + } + } + + @Bean + @ConditionalOnMissingBean + open fun dgsSchemaProvider( + applicationContext: ApplicationContext, + federationResolver: Optional, + existingTypeDefinitionFactory: Optional, + existingCodeRegistry: Optional, + mockProviders: ObjectProvider, + dataFetcherResultProcessors: List, + dataFetcherExceptionHandler: Optional = Optional.empty(), + entityFetcherRegistry: EntityFetcherRegistry, + defaultDataFetcherFactory: Optional> = Optional.empty(), + methodDataFetcherFactory: MethodDataFetcherFactory, + ): DgsSchemaProvider = + DgsSchemaProvider( + applicationContext = applicationContext, + federationResolver = federationResolver, + existingTypeDefinitionRegistry = existingTypeDefinitionFactory, + mockProviders = mockProviders.toSet(), + schemaLocations = configProps.schemaLocations, + dataFetcherResultProcessors = dataFetcherResultProcessors, + dataFetcherExceptionHandler = dataFetcherExceptionHandler, + entityFetcherRegistry = entityFetcherRegistry, + defaultDataFetcherFactory = defaultDataFetcherFactory, + methodDataFetcherFactory = methodDataFetcherFactory, + schemaWiringValidationEnabled = configProps.schemaWiringValidationEnabled, + enableEntityFetcherCustomScalarParsing = configProps.enableEntityFetcherCustomScalarParsing, + ) + + @Bean + open fun graphQlSource( + properties: GraphQlProperties, + dgsSchemaProvider: DgsSchemaProvider, + exceptionResolvers: ObjectProvider, + subscriptionExceptionResolvers: ObjectProvider, + instrumentations: ObjectProvider, + wiringConfigurers: ObjectProvider, + sourceCustomizers: ObjectProvider, + reloadSchemaIndicator: ReloadSchemaIndicator, + defaultExceptionHandler: DataFetcherExceptionHandler, + reportConsumer: Consumer?, + ): GraphQlSource { + val dataFetcherExceptionResolvers: MutableList = + exceptionResolvers + .orderedStream() + .collect(Collectors.toList()) + dataFetcherExceptionResolvers += ExceptionHandlerResolverAdapter(defaultExceptionHandler) + + val builder = + DgsGraphQLSourceBuilder(dgsSchemaProvider, configProps.introspection.showSdlComments) + .exceptionResolvers(dataFetcherExceptionResolvers) + .subscriptionExceptionResolvers(subscriptionExceptionResolvers.orderedStream().toList()) + .instrumentation(instrumentations.orderedStream().toList()) + + if (properties.schema.inspection.isEnabled) { + if (reportConsumer != null) { + builder.inspectSchemaMappings(reportConsumer) + } else if (LOG.isInfoEnabled) { + builder.inspectSchemaMappings { schemaReport -> + val messageBuilder = StringBuilder("***Schema Report***\n") + + val arguments = + schemaReport.unmappedArguments().map { entry -> + val (key, value) = entry + if (key is SelfDescribingDataFetcher) { + val dataFetcher = + (key as DgsGraphQLSourceBuilder.DgsSelfDescribingDataFetcher).dataFetcher + dataFetcher.method.declaringClass.name + "." + dataFetcher.method.name + " for arguments " + value + } else { + entry.toString() + } + } + + messageBuilder.append("Unmapped fields: ").append(schemaReport.unmappedFields()).append('\n') + messageBuilder.append("Unmapped registrations: ").append(schemaReport.unmappedRegistrations()).append('\n') + messageBuilder.append("Unmapped arguments: ").append(arguments).append('\n') + messageBuilder.append("Skipped types: ").append(schemaReport.skippedTypes()).append('\n') + + LOG.info("{}", messageBuilder) + } + } + } + + wiringConfigurers.orderedStream().forEach { configurer: RuntimeWiringConfigurer -> + builder.configureRuntimeWiring(configurer) + } + sourceCustomizers.orderedStream().forEach { customizer: GraphQlSourceBuilderCustomizer -> + customizer.customize(builder) + } + return ReloadableGraphQLSource(builder, reloadSchemaIndicator) + } + + @Bean + @ConditionalOnMissingBean + @ConditionalOnClass(name = ["reactor.core.publisher.Mono"]) + open fun monoReactiveDataFetcherResultProcessor(): MonoDataFetcherResultProcessor = MonoDataFetcherResultProcessor() + + @Bean + @ConditionalOnMissingBean + @ConditionalOnClass(name = ["kotlinx.coroutines.flow.Flow"]) + open fun flowReactiveDataFetcherResultProcessor(): FlowDataFetcherResultProcessor = FlowDataFetcherResultProcessor() + + @Bean + @ConditionalOnMissingBean + @ConditionalOnClass(name = ["reactor.core.publisher.Flux"]) + open fun fluxReactiveDataFetcherResultProcessor(): FluxDataFetcherResultProcessor = FluxDataFetcherResultProcessor() + + /** + * JDK 21+ only - Creates the dgsAsyncTaskExecutor which is used to run data fetchers automatically wrapped in CompletableFuture. + * Can be provided by other frameworks to enable context propagation. + */ + @Bean + @Qualifier("dgsAsyncTaskExecutor") + @ConditionalOnThreading(Threading.VIRTUAL) + @ConditionalOnMissingBean(name = ["dgsAsyncTaskExecutor"]) + @ConditionalOnProperty(name = ["dgs.graphql.virtualthreads.enabled"], havingValue = "true", matchIfMissing = false) + open fun virtualThreadsTaskExecutor(): AsyncTaskExecutor { + LOG.info("Enabling virtual threads for DGS") + + val contextRegistry = + ContextRegistry() + .loadContextAccessors() + .loadThreadLocalAccessors() + .registerThreadLocalAccessor(Slf4jThreadLocalAccessor()) + + val executor = SimpleAsyncTaskExecutor("dgs-virtual-thread-") + executor.setVirtualThreads(true) + executor.setTaskDecorator( + ContextPropagatingTaskDecorator(ContextSnapshotFactory.builder().contextRegistry(contextRegistry).build()), + ) + return executor + } + + @Bean + open fun methodDataFetcherFactory( + argumentResolvers: ObjectProvider, + @Qualifier("dgsAsyncTaskExecutor") taskExecutorOptional: Optional, + ): MethodDataFetcherFactory { + val taskExecutor = + if (taskExecutorOptional.isPresent) { + taskExecutorOptional.get() + } else { + null + } + + return MethodDataFetcherFactory(argumentResolvers.orderedStream().toList(), DefaultParameterNameDiscoverer(), taskExecutor) + } + + @Bean + @ConditionalOnClass(name = ["org.springframework.mock.web.MockHttpServletRequest"]) + open fun mockRequestHeaderCustomizer(): DgsQueryExecutorRequestCustomizer { + /** + * [DgsQueryExecutorRequestCustomizer] implementation which copies headers into + * the request if the request is [MockHttpServletRequest]; intended to support + * test use cases. + */ + return object : DgsQueryExecutorRequestCustomizer { + override fun apply( + request: WebRequest?, + headers: HttpHeaders?, + ): WebRequest? { + if (headers.isNullOrEmpty() || request !is NativeWebRequest) { + return request + } + val mockRequest = + request.nativeRequest as? MockHttpServletRequest + ?: return request + headers.forEach { key, value -> + if (mockRequest.getHeader(key) == null) { + mockRequest.addHeader(key, value) + } + } + return request + } + + override fun toString(): String = "{MockRequestHeaderCustomizer}" + } + } + @Bean @DgsComponent open fun dgsRuntimeWiringConfigurerBridge(configurers: List): DgsRuntimeWiringConfigurerBridge = @@ -139,8 +494,7 @@ open class DgsSpringGraphQLAutoConfiguration { @Bean @ConditionalOnProperty( - prefix = "spring.graphql.schema.introspection", - name = ["enabled"], + name = ["spring.graphql.schema.introspection.enabled"], havingValue = "false", matchIfMissing = false, ) @@ -348,3 +702,21 @@ open class DgsSpringGraphQLAutoConfiguration { ) } } + +class ExceptionHandlerResolverAdapter( + private val dataFetcherExceptionHandler: DataFetcherExceptionHandler, +) : DataFetcherExceptionResolverAdapter() { + override fun resolveToMultipleErrors( + ex: Throwable, + env: DataFetchingEnvironment, + ): MutableList? { + val exceptionHandlerParameters = + DataFetcherExceptionHandlerParameters + .newExceptionParameters() + .exception(ex) + .dataFetchingEnvironment(env) + .build() + + return dataFetcherExceptionHandler.handleException(exceptionHandlerParameters).get().errors + } +} diff --git a/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsSpringGraphQLSourceAutoConfiguration.kt b/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsSpringGraphQLSourceAutoConfiguration.kt deleted file mode 100644 index fdcbee763..000000000 --- a/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsSpringGraphQLSourceAutoConfiguration.kt +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright 2024 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.springgraphql.autoconfig - -import com.netflix.graphql.dgs.internal.DefaultDgsQueryExecutor -import com.netflix.graphql.dgs.internal.DgsSchemaProvider -import com.netflix.graphql.dgs.springgraphql.DgsGraphQLSourceBuilder -import com.netflix.graphql.dgs.springgraphql.ReloadableGraphQLSource -import graphql.GraphQLError -import graphql.execution.DataFetcherExceptionHandler -import graphql.execution.DataFetcherExceptionHandlerParameters -import graphql.execution.instrumentation.Instrumentation -import graphql.schema.DataFetchingEnvironment -import org.slf4j.LoggerFactory -import org.springframework.beans.factory.ObjectProvider -import org.springframework.boot.autoconfigure.AutoConfiguration -import org.springframework.boot.autoconfigure.AutoConfigureAfter -import org.springframework.boot.autoconfigure.AutoConfigureBefore -import org.springframework.boot.autoconfigure.graphql.GraphQlProperties -import org.springframework.boot.autoconfigure.graphql.GraphQlSourceBuilderCustomizer -import org.springframework.context.annotation.Bean -import org.springframework.graphql.execution.DataFetcherExceptionResolver -import org.springframework.graphql.execution.DataFetcherExceptionResolverAdapter -import org.springframework.graphql.execution.GraphQlSource -import org.springframework.graphql.execution.RuntimeWiringConfigurer -import org.springframework.graphql.execution.SchemaReport -import org.springframework.graphql.execution.SelfDescribingDataFetcher -import org.springframework.graphql.execution.SubscriptionExceptionResolver -import java.util.function.Consumer -import java.util.stream.Collectors - -@AutoConfiguration -@AutoConfigureBefore(name = ["org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration"]) -@AutoConfigureAfter(name = ["com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration"]) -open class DgsSpringGraphQLSourceAutoConfiguration( - private val dgsGraphQLConfigProps: DgsGraphQLConfigurationProperties, -) { - companion object { - private val logger = LoggerFactory.getLogger(DgsSpringGraphQLAutoConfiguration::class.java) - } - - @Bean - open fun graphQlSource( - properties: GraphQlProperties, - dgsSchemaProvider: DgsSchemaProvider, - exceptionResolvers: ObjectProvider, - subscriptionExceptionResolvers: ObjectProvider, - instrumentations: ObjectProvider, - wiringConfigurers: ObjectProvider, - sourceCustomizers: ObjectProvider, - reloadSchemaIndicator: DefaultDgsQueryExecutor.ReloadSchemaIndicator, - defaultExceptionHandler: DataFetcherExceptionHandler, - reportConsumer: Consumer?, - ): GraphQlSource { - val dataFetcherExceptionResolvers: MutableList = - exceptionResolvers - .orderedStream() - .collect(Collectors.toList()) - dataFetcherExceptionResolvers += ExceptionHandlerResolverAdapter(defaultExceptionHandler) - - val builder = - DgsGraphQLSourceBuilder(dgsSchemaProvider, dgsGraphQLConfigProps.introspection.showSdlComments) - .exceptionResolvers(dataFetcherExceptionResolvers) - .subscriptionExceptionResolvers(subscriptionExceptionResolvers.orderedStream().toList()) - .instrumentation(instrumentations.orderedStream().toList()) - - if (properties.schema.inspection.isEnabled) { - if (reportConsumer != null) { - builder.inspectSchemaMappings(reportConsumer) - } else if (logger.isInfoEnabled) { - builder.inspectSchemaMappings { schemaReport -> - val messageBuilder = StringBuilder("***Schema Report***\n") - - val arguments = - schemaReport.unmappedArguments().map { entry -> - val (key, value) = entry - if (key is SelfDescribingDataFetcher) { - val dataFetcher = - (key as DgsGraphQLSourceBuilder.DgsSelfDescribingDataFetcher).dataFetcher - dataFetcher.method.declaringClass.name + "." + dataFetcher.method.name + " for arguments " + value - } else { - entry.toString() - } - } - - messageBuilder.append("Unmapped fields: ").append(schemaReport.unmappedFields()).append('\n') - messageBuilder.append("Unmapped registrations: ").append(schemaReport.unmappedRegistrations()).append('\n') - messageBuilder.append("Unmapped arguments: ").append(arguments).append('\n') - messageBuilder.append("Skipped types: ").append(schemaReport.skippedTypes()).append('\n') - - logger.info("{}", messageBuilder) - } - } - } - - wiringConfigurers.orderedStream().forEach { configurer: RuntimeWiringConfigurer -> - builder.configureRuntimeWiring(configurer) - } - sourceCustomizers.orderedStream().forEach { customizer: GraphQlSourceBuilderCustomizer -> - customizer.customize(builder) - } - return ReloadableGraphQLSource(builder, reloadSchemaIndicator) - } -} - -class ExceptionHandlerResolverAdapter( - private val dataFetcherExceptionHandler: DataFetcherExceptionHandler, -) : DataFetcherExceptionResolverAdapter() { - override fun resolveToMultipleErrors( - ex: Throwable, - env: DataFetchingEnvironment, - ): MutableList? { - val exceptionHandlerParameters = - DataFetcherExceptionHandlerParameters - .newExceptionParameters() - .exception(ex) - .dataFetchingEnvironment(env) - .build() - - return dataFetcherExceptionHandler.handleException(exceptionHandlerParameters).get().errors - } -} diff --git a/graphql-dgs-spring-graphql/src/main/resources/META-INF/spring.factories b/graphql-dgs-spring-graphql/src/main/resources/META-INF/spring.factories index 091558cba..bcf1dc944 100644 --- a/graphql-dgs-spring-graphql/src/main/resources/META-INF/spring.factories +++ b/graphql-dgs-spring-graphql/src/main/resources/META-INF/spring.factories @@ -1,3 +1,5 @@ org.springframework.boot.env.EnvironmentPostProcessor=\ com.netflix.graphql.dgs.springgraphql.autoconfig.DgsSpringGraphQLEnvironmentPostProcessor,\ com.netflix.graphql.dgs.springgraphql.autoconfig.ExcludeAutoConfigurationsEnvironmentPostProcessor +org.springframework.boot.diagnostics.FailureAnalyzer=\ + com.netflix.graphql.dgs.diagnostics.SchemaFailureAnalyzer \ No newline at end of file diff --git a/graphql-dgs-spring-graphql/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/graphql-dgs-spring-graphql/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 298cc798d..42951bf83 100644 --- a/graphql-dgs-spring-graphql/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/graphql-dgs-spring-graphql/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1,2 +1,2 @@ com.netflix.graphql.dgs.springgraphql.autoconfig.DgsSpringGraphQLAutoConfiguration -com.netflix.graphql.dgs.springgraphql.autoconfig.DgsSpringGraphQLSourceAutoConfiguration +com.netflix.graphql.dgs.apq.DgsAPQSupportAutoConfiguration \ No newline at end of file diff --git a/graphql-dgs-spring-graphql/src/test/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/ControllerAdviceTest.kt b/graphql-dgs-spring-graphql/src/test/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/ControllerAdviceTest.kt index b98907414..083b52a4b 100644 --- a/graphql-dgs-spring-graphql/src/test/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/ControllerAdviceTest.kt +++ b/graphql-dgs-spring-graphql/src/test/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/ControllerAdviceTest.kt @@ -19,7 +19,7 @@ package com.netflix.graphql.dgs.springgraphql.autoconfig import com.netflix.graphql.dgs.DgsComponent import com.netflix.graphql.dgs.DgsQuery import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration +import com.netflix.graphql.dgs.test.EnableDgsTest import graphql.GraphQLError import org.assertj.core.api.Assertions.assertThat import org.intellij.lang.annotations.Language @@ -35,8 +35,6 @@ import org.springframework.web.bind.annotation.ControllerAdvice @SpringBootTest( classes = [ DgsSpringGraphQLAutoConfiguration::class, - DgsAutoConfiguration::class, - DgsSpringGraphQLSourceAutoConfiguration::class, GraphQlAutoConfiguration::class, ControllerAdviceTest.ControllerAdviceTestConfig::class, ], @@ -46,6 +44,7 @@ import org.springframework.web.bind.annotation.ControllerAdvice "dgs.graphql.schema-wiring-validation-enabled=false", ], ) +@EnableDgsTest class ControllerAdviceTest { @Autowired lateinit var queryExecutor: DgsQueryExecutor diff --git a/graphql-dgs-spring-graphql/src/test/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsSpringGraphQlAutoConfigurationTest.kt b/graphql-dgs-spring-graphql/src/test/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsSpringGraphQlAutoConfigurationTest.kt index 99ebbe72b..9803e9916 100644 --- a/graphql-dgs-spring-graphql/src/test/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsSpringGraphQlAutoConfigurationTest.kt +++ b/graphql-dgs-spring-graphql/src/test/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsSpringGraphQlAutoConfigurationTest.kt @@ -17,7 +17,6 @@ package com.netflix.graphql.dgs.springgraphql.autoconfig import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration import com.netflix.graphql.dgs.internal.DgsSchemaProvider import com.netflix.graphql.dgs.mvc.internal.method.HandlerMethodArgumentResolverAdapter import com.netflix.graphql.dgs.reactive.DgsReactiveQueryExecutor @@ -45,8 +44,6 @@ class DgsSpringGraphQlAutoConfigurationTest { private val autoConfigurations = AutoConfigurations.of( DgsSpringGraphQLAutoConfiguration::class.java, - DgsAutoConfiguration::class.java, - DgsSpringGraphQLSourceAutoConfiguration::class.java, GraphQlAutoConfiguration::class.java, ) @@ -260,61 +257,12 @@ class DgsSpringGraphQlAutoConfigurationTest { } } - @Test - fun introspectionDisabledWithDgsPropertyTest() { - ApplicationContextRunner() - .withConfiguration(autoConfigurations) - .withPropertyValues("dgs.graphql.introspection.enabled=false") - .run { context -> - // Introspection enabled have default config values in a Spring EnvironmentPostProcessor. - DgsSpringGraphQLEnvironmentPostProcessor().postProcessEnvironment( - context.environment, - SpringApplication(context.sourceApplicationContext), - ) - - // Check expected config values. - assertThat(context.environment.getProperty("spring.graphql.schema.introspection.enabled")).isEqualTo("false") - assertThat(context.environment.getProperty("dgs.graphql.introspection.enabled")).isEqualTo("false") - - // Check expected results. - assertThat(context).getBean(DgsQueryExecutor::class.java).extracting { - val response = - it.execute( - " query availableQueries {\n" + - " __schema {\n" + - " queryType {\n" + - " fields {\n" + - " name\n" + - " description\n" + - " }\n" + - " }\n" + - " }\n" + - "}", - ) - assertThat(response.errors.size).isEqualTo(1) - assertThat(response.isDataPresent).isFalse() - assertThat( - response.errors - .first() - .errorType - .toString(), - ).isEqualTo(ErrorClassification.errorClassification("IntrospectionDisabled").toString()) - } - } - } - @Test fun introspectionEnabledWithSpringPropertyTest() { ApplicationContextRunner() .withConfiguration(autoConfigurations) .withPropertyValues("spring.graphql.schema.introspection.enabled=true") .run { context -> - // Introspection enabled have default config values in a Spring EnvironmentPostProcessor. - DgsSpringGraphQLEnvironmentPostProcessor().postProcessEnvironment( - context.environment, - SpringApplication(context.sourceApplicationContext), - ) - // Check expected config values. assertThat(context.environment.getProperty("spring.graphql.schema.introspection.enabled")).isEqualTo("true") assertThat(context.environment.getProperty("dgs.graphql.introspection.enabled")).isEqualTo(null) diff --git a/graphql-dgs-spring-graphql/src/test/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsSpringGraphQlSmokeTest.kt b/graphql-dgs-spring-graphql/src/test/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsSpringGraphQlSmokeTest.kt index 853e6d94f..5109ae1a1 100644 --- a/graphql-dgs-spring-graphql/src/test/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsSpringGraphQlSmokeTest.kt +++ b/graphql-dgs-spring-graphql/src/test/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsSpringGraphQlSmokeTest.kt @@ -20,7 +20,7 @@ import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import com.netflix.graphql.dgs.DgsComponent import com.netflix.graphql.dgs.DgsQuery import com.netflix.graphql.dgs.InputArgument -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration +import com.netflix.graphql.dgs.test.EnableDgsTest import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test import org.springframework.beans.factory.annotation.Autowired @@ -46,8 +46,6 @@ import java.util.function.Consumer classes = [ DgsSpringGraphQlSmokeTest.TestApp::class, DgsSpringGraphQLAutoConfiguration::class, - DgsAutoConfiguration::class, - DgsSpringGraphQLSourceAutoConfiguration::class, GraphQlAutoConfiguration::class, GraphQlWebMvcAutoConfiguration::class, WebMvcAutoConfiguration::class, @@ -60,6 +58,7 @@ import java.util.function.Consumer ], ) @AutoConfigureMockMvc +@EnableDgsTest class DgsSpringGraphQlSmokeTest { @Autowired lateinit var mockMvc: MockMvc diff --git a/graphql-dgs-spring-webflux-autoconfigure/build.gradle.kts b/graphql-dgs-spring-webflux-autoconfigure/build.gradle.kts deleted file mode 100644 index 22f164814..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/build.gradle.kts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -dependencies { - api(project(":graphql-dgs")) - api(project(":graphql-dgs-reactive")) - api(project(":graphql-dgs-subscription-types")) - - implementation("org.springframework.boot:spring-boot-starter") - implementation("org.springframework:spring-webflux") - implementation("com.fasterxml.jackson.module:jackson-module-kotlin") - implementation("io.projectreactor.netty:reactor-netty") - - testImplementation(project(":graphql-dgs-spring-boot-oss-autoconfigure")) - testImplementation("org.springframework.boot:spring-boot-starter-webflux") - testImplementation("io.projectreactor:reactor-test") - testImplementation("com.github.ben-manes.caffeine:caffeine") -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/DgsWebFluxAutoConfiguration.kt b/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/DgsWebFluxAutoConfiguration.kt deleted file mode 100644 index e1c3a2d14..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/DgsWebFluxAutoConfiguration.kt +++ /dev/null @@ -1,308 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.autoconfiguration - -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper -import com.netflix.graphql.dgs.internal.DefaultDgsQueryExecutor -import com.netflix.graphql.dgs.internal.DgsDataLoaderProvider -import com.netflix.graphql.dgs.internal.DgsSchemaProvider -import com.netflix.graphql.dgs.internal.FluxDataFetcherResultProcessor -import com.netflix.graphql.dgs.internal.MonoDataFetcherResultProcessor -import com.netflix.graphql.dgs.internal.QueryValueCustomizer -import com.netflix.graphql.dgs.internal.method.ArgumentResolver -import com.netflix.graphql.dgs.reactive.DgsReactiveCustomContextBuilderWithRequest -import com.netflix.graphql.dgs.reactive.DgsReactiveQueryExecutor -import com.netflix.graphql.dgs.reactive.internal.DefaultDgsReactiveGraphQLContextBuilder -import com.netflix.graphql.dgs.reactive.internal.DefaultDgsReactiveQueryExecutor -import com.netflix.graphql.dgs.reactive.internal.method.SyncHandlerMethodArgumentResolverAdapter -import com.netflix.graphql.dgs.webflux.handlers.DefaultDgsWebfluxHttpHandler -import com.netflix.graphql.dgs.webflux.handlers.DgsHandshakeWebSocketService -import com.netflix.graphql.dgs.webflux.handlers.DgsReactiveWebsocketHandler -import com.netflix.graphql.dgs.webflux.handlers.DgsWebfluxHttpHandler -import com.netflix.graphql.dgs.webflux.handlers.GraphQLMediaTypes -import graphql.ExecutionInput -import graphql.GraphQL -import graphql.execution.AsyncExecutionStrategy -import graphql.execution.AsyncSerialExecutionStrategy -import graphql.execution.DataFetcherExceptionHandler -import graphql.execution.ExecutionIdProvider -import graphql.execution.ExecutionStrategy -import graphql.execution.instrumentation.ChainedInstrumentation -import graphql.execution.instrumentation.Instrumentation -import graphql.execution.preparsed.PreparsedDocumentProvider -import graphql.introspection.IntrospectionQuery -import graphql.schema.GraphQLSchema -import org.springframework.beans.factory.ObjectProvider -import org.springframework.beans.factory.annotation.Qualifier -import org.springframework.beans.factory.config.ConfigurableBeanFactory -import org.springframework.boot.autoconfigure.AutoConfiguration -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty -import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication -import org.springframework.boot.context.properties.EnableConfigurationProperties -import org.springframework.context.ApplicationContext -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration -import org.springframework.core.ReactiveAdapterRegistry -import org.springframework.core.env.Environment -import org.springframework.web.reactive.BindingContext -import org.springframework.web.reactive.function.server.RequestPredicates.accept -import org.springframework.web.reactive.function.server.RouterFunction -import org.springframework.web.reactive.function.server.RouterFunctions -import org.springframework.web.reactive.function.server.ServerResponse -import org.springframework.web.reactive.function.server.ServerResponse.ok -import org.springframework.web.reactive.function.server.ServerResponse.permanentRedirect -import org.springframework.web.reactive.function.server.json -import org.springframework.web.reactive.handler.SimpleUrlHandlerMapping -import org.springframework.web.reactive.result.method.annotation.CookieValueMethodArgumentResolver -import org.springframework.web.reactive.result.method.annotation.RequestHeaderMapMethodArgumentResolver -import org.springframework.web.reactive.result.method.annotation.RequestHeaderMethodArgumentResolver -import org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerAdapter -import org.springframework.web.reactive.result.method.annotation.RequestParamMapMethodArgumentResolver -import org.springframework.web.reactive.result.method.annotation.RequestParamMethodArgumentResolver -import org.springframework.web.reactive.socket.server.WebSocketService -import org.springframework.web.reactive.socket.server.support.WebSocketHandlerAdapter -import org.springframework.web.reactive.socket.server.upgrade.ReactorNettyRequestUpgradeStrategy -import reactor.core.publisher.Mono -import reactor.netty.http.server.WebsocketServerSpec -import java.net.URI -import java.util.* - -@Suppress("SpringJavaInjectionPointsAutowiringInspection") -@AutoConfiguration -@EnableConfigurationProperties(DgsWebfluxConfigurationProperties::class) -open class DgsWebFluxAutoConfiguration( - private val configProps: DgsWebfluxConfigurationProperties, -) { - @Bean - open fun dgsReactiveQueryExecutor( - applicationContext: ApplicationContext, - schema: GraphQLSchema, - schemaProvider: DgsSchemaProvider, - dgsDataLoaderProvider: DgsDataLoaderProvider, - dgsContextBuilder: DefaultDgsReactiveGraphQLContextBuilder, - dataFetcherExceptionHandler: DataFetcherExceptionHandler, - instrumentations: ObjectProvider, - environment: Environment, - @Qualifier("query") providedQueryExecutionStrategy: Optional, - @Qualifier("mutation") providedMutationExecutionStrategy: Optional, - idProvider: Optional, - reloadSchemaIndicator: DefaultDgsQueryExecutor.ReloadSchemaIndicator, - preparsedDocumentProvider: ObjectProvider, - queryValueCustomizer: QueryValueCustomizer, - ): DgsReactiveQueryExecutor { - val queryExecutionStrategy = - providedQueryExecutionStrategy.orElse(AsyncExecutionStrategy(dataFetcherExceptionHandler)) - val mutationExecutionStrategy = - providedMutationExecutionStrategy.orElse(AsyncSerialExecutionStrategy(dataFetcherExceptionHandler)) - val instrumentationImpls = instrumentations.orderedStream().toList() - val instrumentation: Instrumentation? = - when { - instrumentationImpls.size == 1 -> instrumentationImpls.single() - instrumentationImpls.isNotEmpty() -> ChainedInstrumentation(instrumentationImpls) - else -> null - } - - return DefaultDgsReactiveQueryExecutor( - defaultSchema = schema, - schemaProvider = schemaProvider, - dataLoaderProvider = dgsDataLoaderProvider, - contextBuilder = dgsContextBuilder, - instrumentation = instrumentation, - queryExecutionStrategy = queryExecutionStrategy, - mutationExecutionStrategy = mutationExecutionStrategy, - idProvider = idProvider, - reloadIndicator = reloadSchemaIndicator, - preparsedDocumentProvider = preparsedDocumentProvider.ifAvailable, - queryValueCustomizer = queryValueCustomizer, - ) - } - - @Bean - @ConditionalOnMissingBean - open fun reactiveGraphQlContextBuilder( - dgsReactiveCustomContextBuilderWithRequest: Optional>, - ): DefaultDgsReactiveGraphQLContextBuilder = DefaultDgsReactiveGraphQLContextBuilder(dgsReactiveCustomContextBuilderWithRequest) - - @Bean - @ConditionalOnProperty(name = ["dgs.graphql.graphiql.enabled"], havingValue = "true", matchIfMissing = true) - open fun graphiQlConfigurer(configProps: DgsWebfluxConfigurationProperties): GraphiQlConfigurer = GraphiQlConfigurer(configProps) - - @Bean - @ConditionalOnProperty(name = ["dgs.graphql.graphiql.enabled"], havingValue = "true", matchIfMissing = true) - open fun graphiQlIndexRedirect(): RouterFunction = - RouterFunctions - .route() - .GET(configProps.graphiql.path) { - permanentRedirect(URI.create(configProps.graphiql.path + "/index.html")).build() - }.build() - - @Bean - @Qualifier("dgsObjectMapper") - @ConditionalOnMissingBean(name = ["dgsObjectMapper"]) - open fun dgsObjectMapper(): ObjectMapper = jacksonObjectMapper() - - @Bean - @ConditionalOnMissingBean - open fun dgsWebfluxHttpHandler( - dgsQueryExecutor: DgsReactiveQueryExecutor, - @Qualifier("dgsObjectMapper") dgsObjectMapper: ObjectMapper, - ): DgsWebfluxHttpHandler = DefaultDgsWebfluxHttpHandler(dgsQueryExecutor, dgsObjectMapper) - - @Bean - open fun dgsGraphQlRouter(dgsWebfluxHttpHandler: DgsWebfluxHttpHandler): RouterFunction = - RouterFunctions - .route() - .POST( - configProps.path, - accept(*GraphQLMediaTypes.ACCEPTABLE_MEDIA_TYPES.toTypedArray()), - dgsWebfluxHttpHandler::graphql, - ).build() - - @Bean - @ConditionalOnProperty(name = ["dgs.graphql.schema-json.enabled"], havingValue = "true", matchIfMissing = true) - open fun schemaRouter(schemaProvider: DgsSchemaProvider): RouterFunction { - return RouterFunctions - .route() - .GET( - configProps.schemaJson.path, - ) { - val graphQLSchema: GraphQLSchema = schemaProvider.schema().graphQLSchema - val graphQL = GraphQL.newGraphQL(graphQLSchema).build() - - val executionInput: ExecutionInput = - ExecutionInput - .newExecutionInput() - .query(IntrospectionQuery.INTROSPECTION_QUERY) - .build() - val execute = graphQL.executeAsync(executionInput) - - return@GET Mono - .fromCompletionStage(execute) - .map { it.toSpecification() } - .flatMap { ok().json().bodyValue(it) } - }.build() - } - - @Bean - @ConditionalOnMissingBean - open fun websocketSubscriptionHandler( - dgsReactiveQueryExecutor: DgsReactiveQueryExecutor, - webfluxConfigurationProperties: DgsWebfluxConfigurationProperties, - ): SimpleUrlHandlerMapping { - val simpleUrlHandlerMapping = - SimpleUrlHandlerMapping( - mapOf( - webfluxConfigurationProperties.websocket.path to - DgsReactiveWebsocketHandler( - dgsReactiveQueryExecutor, - webfluxConfigurationProperties.websocket.connectionInitTimeout, - ), - ), - ) - simpleUrlHandlerMapping.order = 1 - return simpleUrlHandlerMapping - } - - @Bean - open fun webSocketService(): WebSocketService { - val strategy = ReactorNettyRequestUpgradeStrategy { WebsocketServerSpec.builder().protocols("graphql-ws") } - return DgsHandshakeWebSocketService(strategy) - } - - @Bean - open fun handlerAdapter(webSocketService: WebSocketService): WebSocketHandlerAdapter? = WebSocketHandlerAdapter(webSocketService) - - @Bean - @ConditionalOnMissingBean - open fun monoReactiveDataFetcherResultProcessor(): MonoDataFetcherResultProcessor = MonoDataFetcherResultProcessor() - - @Bean - @ConditionalOnMissingBean - open fun fluxReactiveDataFetcherResultProcessor(): FluxDataFetcherResultProcessor = FluxDataFetcherResultProcessor() - - @Configuration(proxyBeanMethods = false) - @ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.REACTIVE) - open class WebFluxArgumentHandlerConfiguration { - @Qualifier - private annotation class Dgs - - @Dgs - @Bean - open fun dgsBindingContext(adapter: ObjectProvider): BindingContext = - BindingContext(adapter.ifAvailable?.webBindingInitializer) - - @Bean - open fun cookieValueArgumentResolver( - beanFactory: ConfigurableBeanFactory, - registry: ReactiveAdapterRegistry, - @Dgs bindingContext: BindingContext, - ): ArgumentResolver = - SyncHandlerMethodArgumentResolverAdapter( - CookieValueMethodArgumentResolver(beanFactory, registry), - bindingContext, - ) - - @Bean - open fun requestHeaderMapArgumentResolver( - registry: ReactiveAdapterRegistry, - @Dgs bindingContext: BindingContext, - ): ArgumentResolver = - SyncHandlerMethodArgumentResolverAdapter( - RequestHeaderMapMethodArgumentResolver(registry), - bindingContext, - ) - - @Bean - open fun requestHeaderArgumentResolver( - beanFactory: ConfigurableBeanFactory, - registry: ReactiveAdapterRegistry, - @Dgs bindingContext: BindingContext, - ): ArgumentResolver = - SyncHandlerMethodArgumentResolverAdapter( - RequestHeaderMethodArgumentResolver(beanFactory, registry), - bindingContext, - ) - - @Bean - open fun requestParamArgumentResolver( - beanFactory: ConfigurableBeanFactory, - registry: ReactiveAdapterRegistry, - @Dgs bindingContext: BindingContext, - ): ArgumentResolver = - SyncHandlerMethodArgumentResolverAdapter( - RequestParamMethodArgumentResolver( - beanFactory, - registry, - false, - ), - bindingContext, - ) - - @Bean - open fun requestParamMapArgumentResolver( - beanFactory: ConfigurableBeanFactory, - registry: ReactiveAdapterRegistry, - @Dgs bindingContext: BindingContext, - ): ArgumentResolver = - SyncHandlerMethodArgumentResolverAdapter( - RequestParamMapMethodArgumentResolver(registry), - bindingContext, - ) - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/DgsWebfluxConfigurationProperties.kt b/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/DgsWebfluxConfigurationProperties.kt deleted file mode 100644 index d81d01989..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/DgsWebfluxConfigurationProperties.kt +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.autoconfiguration - -import jakarta.annotation.PostConstruct -import org.springframework.boot.context.properties.ConfigurationProperties -import org.springframework.boot.context.properties.NestedConfigurationProperty -import org.springframework.boot.context.properties.bind.DefaultValue -import java.time.Duration - -@ConfigurationProperties(prefix = "dgs.graphql") -@Suppress("ConfigurationProperties") -class DgsWebfluxConfigurationProperties( - /** Websocket configuration. */ - @NestedConfigurationProperty var websocket: DgsWebsocketConfigurationProperties = - DgsWebsocketConfigurationProperties( - DEFAULT_CONNECTION_INIT_TIMEOUT_DURATION, - ), - /** Path to the endpoint that will serve GraphQL requests. */ - @DefaultValue("/graphql") var path: String = "/graphql", - @NestedConfigurationProperty var graphiql: DgsGraphiQLConfigurationProperties = DgsGraphiQLConfigurationProperties(), - @NestedConfigurationProperty var schemaJson: DgsSchemaJsonConfigurationProperties = DgsSchemaJsonConfigurationProperties(), -) { - /** - * Configuration properties for websockets. - */ - data class DgsWebsocketConfigurationProperties( - /** Connection Initialization timeout for graphql-transport-ws. */ - @DefaultValue(DEFAULT_CONNECTION_INIT_TIMEOUT) var connectionInitTimeout: Duration, - /** Path to the Subscriptions endpoint without trailing slash. */ - @DefaultValue("/subscriptions") var path: String = "/subscriptions", - ) - - /** - * Configuration properties for the GraphiQL endpoint. - */ - data class DgsGraphiQLConfigurationProperties( - @DefaultValue("true") var enabled: Boolean = true, - /** Path to the GraphiQL endpoint without trailing slash. */ - @DefaultValue("/graphiql") var path: String = "/graphiql", - /** GraphiQL title */ - @DefaultValue("Simple GraphiQL Example") var title: String = "Simple GraphiQL Example", - ) - - /** - * Configuration properties for the schema-json endpoint. - */ - data class DgsSchemaJsonConfigurationProperties( - /** Path to the schema-json endpoint without trailing slash. */ - @DefaultValue("/schema.json") var path: String = "/schema.json", - ) - - @PostConstruct - fun validatePaths() { - validatePath(this.path, "dgs.graphql.path") - validatePath(this.graphiql.path, "dgs.graphql.graphiql.path") - validatePath(this.schemaJson.path, "dgs.graphql.schema-json.path") - validatePath(this.websocket.path, "dgs.graphql.websocket.path") - } - - private fun validatePath( - path: String, - pathProperty: String, - ) { - if (path != "/" && (!path.startsWith("/") || path.endsWith("/"))) { - throw IllegalArgumentException("$pathProperty must start with '/' and not end with '/' but was '$path'") - } - } - - companion object { - const val DEFAULT_CONNECTION_INIT_TIMEOUT = "10s" - val DEFAULT_CONNECTION_INIT_TIMEOUT_DURATION: Duration = Duration.ofSeconds(10) - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/GraphiQlConfigurer.kt b/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/GraphiQlConfigurer.kt deleted file mode 100644 index 430e6cb05..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/GraphiQlConfigurer.kt +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.autoconfiguration - -import org.springframework.core.io.Resource -import org.springframework.web.reactive.config.ResourceHandlerRegistry -import org.springframework.web.reactive.config.WebFluxConfigurer -import org.springframework.web.reactive.resource.PathResourceResolver -import org.springframework.web.reactive.resource.ResourceTransformer -import org.springframework.web.reactive.resource.ResourceTransformerChain -import org.springframework.web.reactive.resource.TransformedResource -import org.springframework.web.server.ServerWebExchange -import reactor.core.publisher.Mono -import java.io.BufferedReader -import java.io.IOException -import java.nio.charset.StandardCharsets - -class GraphiQlConfigurer( - private val configProps: DgsWebfluxConfigurationProperties, -) : WebFluxConfigurer { - override fun addResourceHandlers(registry: ResourceHandlerRegistry) { - val graphqlPath = configProps.path - val graphiQLTitle = configProps.graphiql.title - registry - .addResourceHandler(configProps.graphiql.path + "/**") - .addResourceLocations("classpath:/graphiql/") - .resourceChain(true) - .addResolver(PathResourceResolver()) - .addTransformer( - TokenReplacingTransformer(mapOf("" to graphqlPath, "" to graphiQLTitle), configProps), - ) - } - - class TokenReplacingTransformer( - private val replaceMap: Map, - private val configProps: DgsWebfluxConfigurationProperties, - ) : ResourceTransformer { - @Throws(IOException::class) - override fun transform( - exchange: ServerWebExchange, - resource: Resource, - transformerChain: ResourceTransformerChain, - ): Mono { - if (exchange.request.uri - .toASCIIString() - .endsWith(configProps.graphiql.path + "/index.html") - ) { - var content = resource.inputStream.bufferedReader().use(BufferedReader::readText) - replaceMap.forEach { content = content.replace(it.key, it.value) } - return Mono.just( - TransformedResource( - resource, - content.toByteArray( - StandardCharsets.UTF_8, - ), - ), - ) - } - return Mono.just(resource) - } - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/DefaultDgsWebfluxHttpHandler.kt b/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/DefaultDgsWebfluxHttpHandler.kt deleted file mode 100644 index 5f0f60da8..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/DefaultDgsWebfluxHttpHandler.kt +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.handlers - -import com.fasterxml.jackson.core.JsonParseException -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.databind.exc.MismatchedInputException -import com.fasterxml.jackson.module.kotlin.readValue -import com.netflix.graphql.dgs.DgsExecutionResult -import com.netflix.graphql.dgs.reactive.DgsReactiveQueryExecutor -import graphql.ExecutionResult -import org.intellij.lang.annotations.Language -import org.slf4j.Logger -import org.slf4j.LoggerFactory -import org.springframework.web.reactive.function.server.ServerRequest -import org.springframework.web.reactive.function.server.ServerResponse -import reactor.core.publisher.Mono - -class DefaultDgsWebfluxHttpHandler( - private val dgsQueryExecutor: DgsReactiveQueryExecutor, - private val objectMapper: ObjectMapper, -) : DgsWebfluxHttpHandler { - override fun graphql(request: ServerRequest): Mono { - @Suppress("UNCHECKED_CAST") - val executionResult: Mono = - - request - .bodyToMono(String::class.java) - .flatMap { body -> - if (GraphQLMediaTypes.isApplicationGraphQL(request)) { - Mono.just(QueryInput(body)) - } else { - Mono.fromCallable { - val readValue = objectMapper.readValue>(body) - val query: String? = - when (val iq = readValue["query"]) { - is String -> iq - else -> null - } - val operationName: String = - when (val iq = readValue["operationName"]) { - is String -> iq - else -> "" - } - QueryInput( - query, - (readValue["variables"] ?: emptyMap()) as Map, - (readValue["extensions"] ?: emptyMap()) as Map, - operationName, - ) - } - } - }.flatMap { queryInput -> - logger.debug("Parsed variables: {}", queryInput.queryVariables) - dgsQueryExecutor.execute( - queryInput.query, - queryInput.queryVariables, - queryInput.extensions, - request.headers().asHttpHeaders(), - queryInput.operationName, - request, - ) - } - - return executionResult - .flatMap { result -> - val dgsExecutionResult = - when (result) { - is DgsExecutionResult -> result - else -> DgsExecutionResult.builder().executionResult(result).build() - } - - ServerResponse - .status(dgsExecutionResult.status) - .headers { it.addAll(dgsExecutionResult.headers()) } - .bodyValue(dgsExecutionResult.toSpecification()) - }.onErrorResume { ex -> - when (ex) { - is JsonParseException -> - ServerResponse - .badRequest() - .bodyValue("Invalid query - ${ex.message ?: "no details found in the error message"}.") - is MismatchedInputException -> - ServerResponse - .badRequest() - .bodyValue("Invalid query - No content to map to input.") - else -> - ServerResponse - .badRequest() - .bodyValue("Invalid query - ${ex.message ?: "no additional details found"}.") - } - } - } - - companion object { - private val logger: Logger = LoggerFactory.getLogger(DefaultDgsWebfluxHttpHandler::class.java) - } -} - -private data class QueryInput( - @Language("graphql") val query: String?, - val queryVariables: Map = emptyMap(), - val extensions: Map = emptyMap(), - val operationName: String = "", -) diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/DgsHandshakeWebSocketService.kt b/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/DgsHandshakeWebSocketService.kt deleted file mode 100644 index 4de25d47d..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/DgsHandshakeWebSocketService.kt +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.handlers - -import org.slf4j.LoggerFactory -import org.springframework.web.reactive.socket.WebSocketHandler -import org.springframework.web.reactive.socket.server.RequestUpgradeStrategy -import org.springframework.web.reactive.socket.server.support.HandshakeWebSocketService -import org.springframework.web.server.ServerWebExchange -import reactor.core.publisher.Mono - -class DgsHandshakeWebSocketService : HandshakeWebSocketService { - constructor() : super() - - constructor (upgradeStrategy: RequestUpgradeStrategy) : super(upgradeStrategy) - - override fun handleRequest( - exchange: ServerWebExchange, - handler: WebSocketHandler, - ): Mono { - var newExchange = exchange - var request = exchange.request - val headers = request.headers - val protocols = headers[SEC_WEBSOCKET_PROTOCOL] - - if (protocols.isNullOrEmpty()) { - request = request.mutate().header(SEC_WEBSOCKET_PROTOCOL, "graphql-ws").build() - newExchange = newExchange.mutate().request(request).build() - } - - return super.handleRequest(newExchange, handler) - } - - companion object { - private const val SEC_WEBSOCKET_PROTOCOL = "Sec-WebSocket-Protocol" - private val logger = LoggerFactory.getLogger(DgsHandshakeWebSocketService::class.java) - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/DgsReactiveWebsocketHandler.kt b/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/DgsReactiveWebsocketHandler.kt deleted file mode 100644 index 729a71307..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/DgsReactiveWebsocketHandler.kt +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.handlers - -import com.netflix.graphql.dgs.reactive.DgsReactiveQueryExecutor -import com.netflix.graphql.types.subscription.GRAPHQL_SUBSCRIPTIONS_TRANSPORT_WS_PROTOCOL -import com.netflix.graphql.types.subscription.GRAPHQL_SUBSCRIPTIONS_WS_PROTOCOL -import org.springframework.web.reactive.socket.WebSocketHandler -import org.springframework.web.reactive.socket.WebSocketSession -import reactor.core.publisher.Mono -import java.time.Duration - -class DgsReactiveWebsocketHandler( - dgsReactiveQueryExecutor: DgsReactiveQueryExecutor, - connectionInitTimeout: Duration, -) : WebSocketHandler { - private val graphqlWSHandler = WebsocketGraphQLWSProtocolHandler(dgsReactiveQueryExecutor) - private val graphqlTransportWSHandler = WebsocketGraphQLTransportWSProtocolHandler(dgsReactiveQueryExecutor, connectionInitTimeout) - - override fun getSubProtocols(): List = listOf(GRAPHQL_SUBSCRIPTIONS_WS_PROTOCOL, GRAPHQL_SUBSCRIPTIONS_TRANSPORT_WS_PROTOCOL) - - override fun handle(webSocketSession: WebSocketSession): Mono { - if (webSocketSession.handshakeInfo.subProtocol.equals(GRAPHQL_SUBSCRIPTIONS_WS_PROTOCOL, ignoreCase = true)) { - return graphqlWSHandler.handle(webSocketSession) - } else if (webSocketSession.handshakeInfo.subProtocol.equals(GRAPHQL_SUBSCRIPTIONS_TRANSPORT_WS_PROTOCOL, ignoreCase = true)) { - return graphqlTransportWSHandler.handle(webSocketSession) - } - - return Mono.empty() - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/DgsWebfluxHttpHandler.kt b/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/DgsWebfluxHttpHandler.kt deleted file mode 100644 index f1fa33e22..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/DgsWebfluxHttpHandler.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.handlers - -import org.springframework.web.reactive.function.server.ServerRequest -import org.springframework.web.reactive.function.server.ServerResponse -import reactor.core.publisher.Mono - -interface DgsWebfluxHttpHandler { - fun graphql(request: ServerRequest): Mono -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/GraphQLMediaTypes.kt b/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/GraphQLMediaTypes.kt deleted file mode 100644 index ffd9c653e..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/GraphQLMediaTypes.kt +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.handlers - -import org.springframework.http.MediaType -import org.springframework.web.reactive.function.server.ServerRequest - -object GraphQLMediaTypes { - private val GRAPHQL_MEDIA_TYPE = MediaType("application", "graphql") - val ACCEPTABLE_MEDIA_TYPES = listOf(GRAPHQL_MEDIA_TYPE, MediaType.APPLICATION_JSON) - - fun isApplicationGraphQL(request: ServerRequest): Boolean = - request - .headers() - .contentType() - .map { - GRAPHQL_MEDIA_TYPE.includes(it) - }.orElse(false) -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/WebFluxCookieValueResolver.kt b/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/WebFluxCookieValueResolver.kt deleted file mode 100644 index 3c275939c..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/WebFluxCookieValueResolver.kt +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.handlers - -import com.netflix.graphql.dgs.internal.CookieValueResolver -import com.netflix.graphql.dgs.internal.DgsRequestData -import com.netflix.graphql.dgs.reactive.internal.DgsReactiveRequestData -import org.springframework.http.HttpCookie -import org.springframework.util.MultiValueMap - -class WebFluxCookieValueResolver : CookieValueResolver { - override fun getCookieValue( - name: String, - requestData: DgsRequestData?, - ): String? = - if (requestData is DgsReactiveRequestData) { - val cookies: MultiValueMap? = requestData.serverRequest?.cookies() - cookies?.getFirst(name)?.value - } else { - null - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/WebsocketGraphQLTransportWSProtocolHandler.kt b/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/WebsocketGraphQLTransportWSProtocolHandler.kt deleted file mode 100644 index 95510c5d3..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/WebsocketGraphQLTransportWSProtocolHandler.kt +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.handlers - -import com.fasterxml.jackson.module.kotlin.convertValue -import com.netflix.graphql.dgs.reactive.DgsReactiveQueryExecutor -import com.netflix.graphql.types.subscription.websockets.CloseCode -import com.netflix.graphql.types.subscription.websockets.Message -import graphql.ExecutionResult -import graphql.GraphqlErrorBuilder -import org.reactivestreams.Publisher -import org.reactivestreams.Subscription -import org.slf4j.Logger -import org.slf4j.LoggerFactory -import org.springframework.core.ResolvableType -import org.springframework.core.io.buffer.DataBuffer -import org.springframework.core.io.buffer.DataBufferUtils -import org.springframework.http.codec.json.Jackson2JsonDecoder -import org.springframework.http.codec.json.Jackson2JsonEncoder -import org.springframework.util.MimeTypeUtils -import org.springframework.web.reactive.socket.CloseStatus -import org.springframework.web.reactive.socket.WebSocketMessage -import org.springframework.web.reactive.socket.WebSocketSession -import reactor.core.publisher.Flux -import reactor.core.publisher.Mono -import java.time.Duration -import java.util.concurrent.ConcurrentHashMap - -class WebsocketGraphQLTransportWSProtocolHandler( - private val dgsReactiveQueryExecutor: DgsReactiveQueryExecutor, - private val connectionInitTimeout: Duration, -) : WebsocketReactiveProtocolHandler { - private val resolvableType = ResolvableType.forType(Message::class.java) - private val sessions = ConcurrentHashMap>() - private val connections = ConcurrentHashMap() - private val decoder = Jackson2JsonDecoder() - private val encoder = Jackson2JsonEncoder(decoder.objectMapper) - - override fun handle(webSocketSession: WebSocketSession): Mono { - connections[webSocketSession.id] = false - - Mono - .delay(connectionInitTimeout) - .then( - Mono.defer { - if (connections[webSocketSession.id] == false) { - webSocketSession.close( - CloseStatus(CloseCode.ConnectionInitialisationTimeout.code, "Did not receive a ConnectionInitMessage"), - ) - } else { - Mono.empty() - } - }, - ).subscribe() - - return webSocketSession.send( - webSocketSession - .receive() - .flatMap outer@{ message -> - val buffer: DataBuffer = DataBufferUtils.retain(message.payload) - val operationMessage: Message = - decoder.decode( - buffer, - resolvableType, - MimeTypeUtils.APPLICATION_JSON, - null, - ) as Message - - when (operationMessage) { - is Message.ConnectionInitMessage -> { - if (connections[webSocketSession.id]!!) { - // we've already received a connection request and this must be an error - return@outer webSocketSession - .close( - CloseStatus( - CloseCode.TooManyInitialisationRequests.code, - "Too many connection initialisation requests", - ), - ).thenMany(Mono.empty()) - } - connections[webSocketSession.id] = true - Flux.just( - toWebsocketMessage( - Message.ConnectionAckMessage(), - webSocketSession, - ), - ) - } - is Message.SubscribeMessage -> { - val queryPayload = - decoder.objectMapper.convertValue( - operationMessage.payload, - ) - if (sessions.containsKey(webSocketSession.id)) { - return@outer webSocketSession - .close( - CloseStatus( - CloseCode.SubscriberAlreadyExists.code, - "Subscriber for ${webSocketSession.id} already exists", - ), - ).thenMany(Mono.empty()) - } - logger.debug("Starting subscription {} for session {}", queryPayload, webSocketSession.id) - dgsReactiveQueryExecutor - .execute(queryPayload.query, queryPayload.variables) - .flatMapMany { executionResult -> - val publisher: Publisher = executionResult.getData() - Flux - .from(publisher) - .map { er -> - toWebsocketMessage( - Message.NextMessage( - payload = - com.netflix.graphql.types.subscription.websockets.ExecutionResult( - er.getData(), - er.errors, - ), - id = operationMessage.id, - ), - webSocketSession, - ) - }.doOnSubscribe { - if (operationMessage.id != null) { - sessions[webSocketSession.id] = mutableMapOf(operationMessage.id to it) - } - }.doOnComplete { - webSocketSession - .send( - Flux.just( - toWebsocketMessage( - Message.CompleteMessage(operationMessage.id), - webSocketSession, - ), - ), - ).subscribe() - - sessions[webSocketSession.id]?.remove(operationMessage.id) - logger.debug( - "Completing subscription {} for connection {}", - operationMessage.id, - webSocketSession.id, - ) - }.doOnError { - webSocketSession - .send( - Flux.just( - toWebsocketMessage( - Message.ErrorMessage( - payload = - listOf( - GraphqlErrorBuilder.newError().message(it.message).build(), - ), - id = operationMessage.id, - ), - webSocketSession, - ), - ), - ).subscribe() - - sessions[webSocketSession.id]?.remove(operationMessage.id) - logger.debug( - "Subscription publisher error for input {} for subscription {} for connection {}", - queryPayload, - operationMessage.id, - webSocketSession.id, - it, - ) - } - } - } - is Message.PingMessage -> - Flux.just( - toWebsocketMessage( - Message.PongMessage(), - webSocketSession, - ), - ) - is Message.PongMessage -> Flux.empty() - is Message.CompleteMessage -> { - sessions[webSocketSession.id]?.remove(operationMessage.id)?.cancel() - logger.debug( - "Client stopped subscription {} for connection {}", - operationMessage.id, - webSocketSession.id, - ) - Flux.empty() - } - else -> { - return@outer webSocketSession - .close( - CloseStatus(CloseCode.BadRequest.code, "Unrecognized message"), - ).thenMany(Mono.empty()) - } - } - }.log() - .doFinally { - logger.debug("Cleaning up subscriptions for session ${webSocketSession.id}") - sessions[webSocketSession.id]?.forEach { - it.value.cancel() - } - sessions.remove(webSocketSession.id) - connections.remove(webSocketSession.id) - }, - ) - } - - private fun toWebsocketMessage( - operationMessage: Message, - session: WebSocketSession, - ): WebSocketMessage = - WebSocketMessage( - WebSocketMessage.Type.TEXT, - encoder.encodeValue( - operationMessage, - session.bufferFactory(), - resolvableType, - MimeTypeUtils.APPLICATION_JSON, - null, - ), - ) - - companion object { - private val logger: Logger = LoggerFactory.getLogger(DgsReactiveQueryExecutor::class.java) - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/WebsocketGraphQLWSProtocolHandler.kt b/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/WebsocketGraphQLWSProtocolHandler.kt deleted file mode 100644 index 7a9b5aa53..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/WebsocketGraphQLWSProtocolHandler.kt +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.handlers - -import com.fasterxml.jackson.module.kotlin.convertValue -import com.netflix.graphql.dgs.reactive.DgsReactiveQueryExecutor -import com.netflix.graphql.types.subscription.DataPayload -import com.netflix.graphql.types.subscription.GQL_COMPLETE -import com.netflix.graphql.types.subscription.GQL_CONNECTION_ACK -import com.netflix.graphql.types.subscription.GQL_CONNECTION_INIT -import com.netflix.graphql.types.subscription.GQL_CONNECTION_TERMINATE -import com.netflix.graphql.types.subscription.GQL_DATA -import com.netflix.graphql.types.subscription.GQL_ERROR -import com.netflix.graphql.types.subscription.GQL_START -import com.netflix.graphql.types.subscription.GQL_STOP -import com.netflix.graphql.types.subscription.OperationMessage -import com.netflix.graphql.types.subscription.QueryPayload -import graphql.ExecutionResult -import org.reactivestreams.Publisher -import org.reactivestreams.Subscription -import org.slf4j.LoggerFactory -import org.springframework.core.ResolvableType -import org.springframework.core.io.buffer.DataBuffer -import org.springframework.core.io.buffer.DataBufferUtils -import org.springframework.http.codec.json.Jackson2JsonDecoder -import org.springframework.http.codec.json.Jackson2JsonEncoder -import org.springframework.util.MimeTypeUtils -import org.springframework.web.reactive.socket.WebSocketMessage -import org.springframework.web.reactive.socket.WebSocketSession -import reactor.core.publisher.Flux -import reactor.core.publisher.Mono -import java.util.concurrent.ConcurrentHashMap - -class WebsocketGraphQLWSProtocolHandler( - private val dgsReactiveQueryExecutor: DgsReactiveQueryExecutor, -) : WebsocketReactiveProtocolHandler { - private val resolvableType = ResolvableType.forType(OperationMessage::class.java) - private val sessions = ConcurrentHashMap>() - private val decoder = Jackson2JsonDecoder() - private val encoder = Jackson2JsonEncoder(decoder.objectMapper) - - override fun handle(webSocketSession: WebSocketSession): Mono = - webSocketSession.send( - webSocketSession - .receive() - .flatMap { message -> - val buffer: DataBuffer = DataBufferUtils.retain(message.payload) - - val operationMessage: OperationMessage = - decoder.decode( - buffer, - resolvableType, - MimeTypeUtils.APPLICATION_JSON, - null, - ) as OperationMessage - - when (operationMessage.type) { - GQL_CONNECTION_INIT -> - Flux.just( - toWebsocketMessage( - OperationMessage(GQL_CONNECTION_ACK), - webSocketSession, - ), - ) - GQL_START -> { - val queryPayload = - decoder.objectMapper.convertValue( - operationMessage.payload ?: error("payload == null"), - ) - logger.debug("Starting subscription {} for session {}", queryPayload, webSocketSession.id) - dgsReactiveQueryExecutor - .execute(queryPayload.query, queryPayload.variables) - .flatMapMany { executionResult -> - val publisher: Publisher = executionResult.getData() - Flux - .from(publisher) - .map { er -> - toWebsocketMessage( - OperationMessage( - GQL_DATA, - DataPayload(data = er.getData(), errors = er.errors), - operationMessage.id, - ), - webSocketSession, - ) - }.doOnSubscribe { - if (operationMessage.id != null) { - sessions[webSocketSession.id] = mutableMapOf(operationMessage.id!! to it) - } - }.doOnComplete { - webSocketSession - .send( - Flux.just( - toWebsocketMessage( - OperationMessage(GQL_COMPLETE, null, operationMessage.id), - webSocketSession, - ), - ), - ).subscribe() - - sessions[webSocketSession.id]?.remove(operationMessage.id) - logger.debug( - "Completing subscription {} for connection {}", - operationMessage.id, - webSocketSession.id, - ) - }.doOnError { - webSocketSession - .send( - Flux.just( - toWebsocketMessage( - OperationMessage( - GQL_ERROR, - DataPayload(null, listOf(it.message!!)), - operationMessage.id, - ), - webSocketSession, - ), - ), - ).subscribe() - - sessions[webSocketSession.id]?.remove(operationMessage.id) - logger.debug( - "Subscription publisher error for input {} for subscription {} for connection {}", - queryPayload, - operationMessage.id, - webSocketSession.id, - it, - ) - } - } - } - - GQL_STOP -> { - sessions[webSocketSession.id]?.remove(operationMessage.id)?.cancel() - logger.debug( - "Client stopped subscription {} for connection {}", - operationMessage.id, - webSocketSession.id, - ) - Flux.empty() - } - - GQL_CONNECTION_TERMINATE -> { - sessions[webSocketSession.id]?.values?.forEach { it.cancel() } - sessions.remove(webSocketSession.id) - webSocketSession.close() - logger.debug("Connection {} terminated", webSocketSession.id) - Flux.empty() - } - - else -> Flux.empty() - } - }, - ) - - private fun toWebsocketMessage( - operationMessage: OperationMessage, - session: WebSocketSession, - ): WebSocketMessage = - WebSocketMessage( - WebSocketMessage.Type.TEXT, - encoder.encodeValue( - operationMessage, - session.bufferFactory(), - resolvableType, - MimeTypeUtils.APPLICATION_JSON, - null, - ), - ) - - companion object { - private val logger = LoggerFactory.getLogger(DgsReactiveQueryExecutor::class.java) - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/WebsocketReactiveProtocolHandler.kt b/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/WebsocketReactiveProtocolHandler.kt deleted file mode 100644 index e874d7458..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webflux/handlers/WebsocketReactiveProtocolHandler.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.handlers - -import org.springframework.web.reactive.socket.WebSocketSession -import reactor.core.publisher.Mono - -interface WebsocketReactiveProtocolHandler { - fun handle(webSocketSession: WebSocketSession): Mono -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/graphql-dgs-spring-webflux-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index 45d3e3b16..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1 +0,0 @@ -com.netflix.graphql.dgs.webflux.autoconfiguration.DgsWebFluxAutoConfiguration diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/main/resources/graphiql/index.html b/graphql-dgs-spring-webflux-autoconfigure/src/main/resources/graphiql/index.html deleted file mode 100644 index 6caec6725..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/main/resources/graphiql/index.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - <DGS_GRAPHIQL_TITLE> - - - -

- - - - - - - diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/MalformedQueryContentTest.kt b/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/MalformedQueryContentTest.kt deleted file mode 100644 index 1da0dfe47..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/MalformedQueryContentTest.kt +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry -import com.netflix.graphql.dgs.webflux.autoconfiguration.DgsWebFluxAutoConfiguration -import graphql.schema.idl.SchemaParser -import graphql.schema.idl.TypeDefinitionRegistry -import org.assertj.core.api.Assertions.assertThat -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.autoconfigure.SpringBootApplication -import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.context.annotation.ComponentScan -import org.springframework.context.annotation.FilterType -import org.springframework.context.annotation.Import -import org.springframework.test.web.reactive.server.WebTestClient -import org.springframework.test.web.reactive.server.expectBody -import org.springframework.web.reactive.config.EnableWebFlux - -@SpringBootTest -@EnableWebFlux -@AutoConfigureWebTestClient -@Import(DgsWebFluxAutoConfiguration::class) -class MalformedQueryContentTest { - @Autowired - lateinit var webTestClient: WebTestClient - - @Test - fun `Should return a bad request error if the POST request has no content`() { - webTestClient - .post() - .uri("/graphql") - .bodyValue(" ") - .exchange() - .expectStatus() - .isBadRequest - .expectBody() - .isEqualTo("Invalid query - No content to map to input.") - } - - @Test - fun `Should return a bad request error if the POST request has a malformed query`() { - webTestClient - .post() - .uri("/graphql") - .bodyValue("{") - .exchange() - .expectStatus() - .isBadRequest - .expectBody() - .consumeWith { assertThat(it.responseBody).startsWith("Invalid query -") } - } - - @Test - fun `Should return a GraphQL Error if the query is empty`() { - webTestClient - .post() - .uri("/graphql") - .bodyValue("{ }") - .exchange() - .expectStatus() - .isBadRequest - .expectBody() - .json( - """ - { - "errors":[ - { - "message": "GraphQL operations must contain a non-empty `query`.", - "extensions": { - "errorType":"BAD_REQUEST", - "class":"com.netflix.graphql.dgs.exceptions.DgsBadRequestException" - } - } - ] - } - """.trimIndent(), - ) - } - - @SpringBootApplication(proxyBeanMethods = false, scanBasePackages = []) - @ComponentScan( - useDefaultFilters = false, - includeFilters = [ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = [])], - ) - @SuppressWarnings("unused") - open class LocalApp { - @DgsComponent - class ExampleImplementation { - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry = SchemaParser().parse("type Query{ }") - } - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/apq/DgsWebFluxAutomatedPersistedQueriesSmokeTest.kt b/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/apq/DgsWebFluxAutomatedPersistedQueriesSmokeTest.kt deleted file mode 100644 index 6263edf31..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/apq/DgsWebFluxAutomatedPersistedQueriesSmokeTest.kt +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.apq - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry -import com.netflix.graphql.dgs.webflux.autoconfiguration.DgsWebFluxAutoConfiguration -import graphql.schema.idl.SchemaParser -import graphql.schema.idl.TypeDefinitionRegistry -import org.junit.jupiter.api.MethodOrderer -import org.junit.jupiter.api.Order -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.TestMethodOrder -import org.junit.jupiter.api.parallel.Execution -import org.junit.jupiter.api.parallel.ExecutionMode -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.autoconfigure.SpringBootApplication -import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.context.annotation.ComponentScan -import org.springframework.context.annotation.FilterType -import org.springframework.context.annotation.Import -import org.springframework.test.web.reactive.server.WebTestClient -import org.springframework.web.reactive.config.EnableWebFlux - -@SpringBootTest( - properties = [ - "debug:true", - "dgs.graphql.apq.enabled:true", - ], -) -@EnableWebFlux -@AutoConfigureWebTestClient -@Import(DgsWebFluxAutoConfiguration::class) -@Execution(ExecutionMode.SAME_THREAD) -@TestMethodOrder(MethodOrderer.OrderAnnotation::class) -class DgsWebFluxAutomatedPersistedQueriesSmokeTest { - @Autowired - lateinit var webTestClient: WebTestClient - - @Test - @Order(0) - fun `The demo app is able to start`() { - } - - @Test - @Order(1) - fun `Attempt to execute a POST Request with a known hash`() { - webTestClient - .post() - .uri("/graphql") - .bodyValue( - """ - |{ - | "extensions":{ - | "persistedQuery":{ - | "version":1, - | "sha256Hash":"ecf4edb46db40b5132295c0291d62fb65d6759a9eedfa4d5d612dd5ec54a6b38" - | } - | } - | } - | - """.trimMargin(), - ).exchange() - .expectStatus() - .isOk() - .expectBody() - .json( - """ - |{ - | "errors":[ - | { - | "message":"PersistedQueryNotFound", - | "locations":[], - | "extensions":{ - | "persistedQueryId":"ecf4edb46db40b5132295c0291d62fb65d6759a9eedfa4d5d612dd5ec54a6b38", - | "generatedBy":"graphql-java", - | "classification":"PersistedQueryNotFound" - | } - | } - | ] - | } - | - """.trimMargin(), - ) - } - - @Test - @Order(2) - fun `Execute a POST Request with a known hash and query`() { - webTestClient - .post() - .uri("/graphql") - .bodyValue( - """ - |{ - | "query": "{__typename}", - | "extensions":{ - | "persistedQuery":{ - | "version":1, - | "sha256Hash":"ecf4edb46db40b5132295c0291d62fb65d6759a9eedfa4d5d612dd5ec54a6b38" - | } - | } - | } - | - """.trimMargin(), - ).exchange() - .expectStatus() - .isOk - .expectBody() - .json( - """ - | { - | "data": { - | "__typename":"Query" - | } - | } - | - """.trimMargin(), - ) - } - - @Test - @Order(3) - fun `Execute a POST Request with a known hash once the query was registered`() { - webTestClient - .post() - .uri("/graphql") - .bodyValue( - """ - |{ - | "extensions":{ - | "persistedQuery":{ - | "version":1, - | "sha256Hash":"ecf4edb46db40b5132295c0291d62fb65d6759a9eedfa4d5d612dd5ec54a6b38" - | } - | } - | } - | - """.trimMargin(), - ).exchange() - .expectStatus() - .isOk - .expectBody() - .json( - """ - | { - | "data": { - | "__typename":"Query" - | } - | } - | - """.trimMargin(), - ) - } - - @SpringBootApplication(proxyBeanMethods = false, scanBasePackages = []) - @ComponentScan( - useDefaultFilters = false, - includeFilters = [ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = [])], - ) - @SuppressWarnings("unused") - open class LocalApp { - @DgsComponent - class ExampleImplementation { - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry { - val schemaParser = SchemaParser() - - val gqlSchema = - """ - |type Query{ - |} - """.trimMargin() - return schemaParser.parse(gqlSchema) - } - } - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/CustomDgsWebfluxHttpHandler.kt b/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/CustomDgsWebfluxHttpHandler.kt deleted file mode 100644 index 6747ae2c6..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/CustomDgsWebfluxHttpHandler.kt +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.autoconfiguration - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsQuery -import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import com.netflix.graphql.dgs.webflux.handlers.DgsWebfluxHttpHandler -import graphql.language.FieldDefinition -import graphql.language.ObjectTypeDefinition -import graphql.language.TypeName -import graphql.schema.idl.TypeDefinitionRegistry -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.boot.test.context.TestConfiguration -import org.springframework.context.annotation.Bean -import org.springframework.test.web.reactive.server.WebTestClient -import org.springframework.web.reactive.config.EnableWebFlux -import org.springframework.web.reactive.function.server.ServerRequest -import org.springframework.web.reactive.function.server.ServerResponse -import reactor.core.publisher.Mono - -@AutoConfigureWebTestClient -@EnableWebFlux -@SpringBootTest( - classes = [ - CustomDgsWebfluxHttpHandler.TestConfig::class, - DgsWebFluxAutoConfiguration::class, - DgsAutoConfiguration::class, - CustomDgsWebfluxHttpHandler.ExampleImplementation::class, - ], -) -class CustomDgsWebfluxHttpHandler { - @Autowired - lateinit var webTestClient: WebTestClient - - @Test - fun customDgsWebfluxHttpHandler() { - webTestClient - .post() - .uri("/graphql") - .bodyValue( - """ - {"query": "hello"} - """.trimIndent(), - ).exchange() - .expectBody() - .jsonPath("query") - .isEqualTo("hello") - } - - @TestConfiguration - open class TestConfig { - @Bean - open fun customPreparsedDocumentProvider(): DgsWebfluxHttpHandler = CustomHttpHandler() - - class CustomHttpHandler : DgsWebfluxHttpHandler { - override fun graphql(request: ServerRequest): Mono = - ServerResponse.ok().body(request.bodyToMono(String::class.java), String::class.java) - } - } - - @DgsComponent - class ExampleImplementation { - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry { - val newRegistry = TypeDefinitionRegistry() - - val query = - ObjectTypeDefinition - .newObjectTypeDefinition() - .name("Query") - .fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("hello") - .type(TypeName("String")) - .build(), - ).build() - newRegistry.add(query) - - return newRegistry - } - - @DgsQuery - fun hello(): String = "Hello, DGS" - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/GraphQlCustomEndpoint.kt b/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/GraphQlCustomEndpoint.kt deleted file mode 100644 index c16dbe1f6..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/GraphQlCustomEndpoint.kt +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.autoconfiguration - -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import org.assertj.core.api.Assertions -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.test.web.reactive.server.WebTestClient -import org.springframework.test.web.reactive.server.expectBody -import org.springframework.web.reactive.config.EnableWebFlux - -@AutoConfigureWebTestClient -@EnableWebFlux -@SpringBootTest( - classes = [ - DgsWebFluxAutoConfiguration::class, - DgsAutoConfiguration::class, - WebRequestTestWithCustomEndpoint.ExampleImplementation::class, - ], - properties = ["dgs.graphql.path=/api/graphql"], -) -class GraphQlCustomEndpoint( - @Autowired private val webTestClient: WebTestClient, -) { - @Test - fun customGraphiQlPathRedirect() { - webTestClient - .get() - .uri("/graphiql") - .exchange() - .expectStatus() - .is3xxRedirection - } - - @Test - fun customGraphiQlPath() { - webTestClient - .get() - .uri("/graphiql/index.html") - .exchange() - .expectStatus() - .is2xxSuccessful - .expectBody() - .consumeWith { - Assertions.assertThat(it.responseBody).contains("fetch(origin + '/api/graphql") - } - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/GraphiQlCustomEndpoint.kt b/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/GraphiQlCustomEndpoint.kt deleted file mode 100644 index 6d44ca2ee..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/GraphiQlCustomEndpoint.kt +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.autoconfiguration - -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import org.assertj.core.api.Assertions -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.test.web.reactive.server.WebTestClient -import org.springframework.test.web.reactive.server.expectBody -import org.springframework.web.reactive.config.EnableWebFlux - -@AutoConfigureWebTestClient -@EnableWebFlux -@SpringBootTest( - classes = [ - DgsWebFluxAutoConfiguration::class, - DgsAutoConfiguration::class, - WebRequestTestWithCustomEndpoint.ExampleImplementation::class, - ], - properties = ["dgs.graphql.graphiql.path=/customEndpoint"], -) -class GraphiQlCustomEndpoint( - @Autowired private val webTestClient: WebTestClient, -) { - @Test - fun customGraphiQlPathRedirect() { - webTestClient - .get() - .uri("/customEndpoint") - .exchange() - .expectStatus() - .is3xxRedirection - } - - @Test - fun customGraphiQlPath() { - webTestClient - .get() - .uri("/customEndpoint/index.html") - .exchange() - .expectStatus() - .is2xxSuccessful - .expectBody() - .consumeWith { - Assertions.assertThat(it.responseBody).contains("fetch(origin + '/graphql") - } - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/GraphiQlCustomTitle.kt b/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/GraphiQlCustomTitle.kt deleted file mode 100644 index bfdd77349..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/GraphiQlCustomTitle.kt +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.autoconfiguration - -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.test.web.reactive.server.WebTestClient -import org.springframework.web.reactive.config.EnableWebFlux - -@AutoConfigureWebTestClient -@EnableWebFlux -@SpringBootTest( - classes = [ - DgsWebFluxAutoConfiguration::class, - DgsAutoConfiguration::class, - WebRequestTestWithCustomEndpoint.ExampleImplementation::class, - ], - properties = ["dgs.graphql.graphiql.title=Custom GraphiQL Title"], -) -class GraphiQlCustomTitle { - @Autowired - lateinit var webTestClient: WebTestClient - - @Test - fun customGraphiQlTitle() { - webTestClient - .get() - .uri("/graphiql/index.html") - .exchange() - .expectStatus() - .isOk - .expectBody() - .toString() - .contains("Custom GraphiQL Title") - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/GraphiQlUI.kt b/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/GraphiQlUI.kt deleted file mode 100644 index be9ce1e75..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/GraphiQlUI.kt +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.autoconfiguration - -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.test.web.reactive.server.WebTestClient -import org.springframework.web.reactive.config.EnableWebFlux - -@AutoConfigureWebTestClient -@EnableWebFlux -@SpringBootTest( - classes = [ - DgsWebFluxAutoConfiguration::class, - DgsAutoConfiguration::class, - WebRequestTestWithCustomEndpoint.ExampleImplementation::class, - ], -) -class GraphiQlUI { - @Autowired - lateinit var webTestClient: WebTestClient - - @Test - fun `GraphiQL should be availble`() { - webTestClient - .get() - .uri("/graphiql/index.html") - .exchange() - .expectStatus() - .isOk - } - - @Test - fun `graphiql should redirect to correct page`() { - webTestClient - .get() - .uri("/graphiql") - .exchange() - .expectStatus() - .isPermanentRedirect - } - - @Test - fun `graphiql title should be default`() { - webTestClient - .get() - .uri("/graphiql/index.html") - .exchange() - .expectStatus() - .isOk - .expectBody() - .toString() - .contains("Simple GraphiQL Example") - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/GraphiQlUIDisabled.kt b/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/GraphiQlUIDisabled.kt deleted file mode 100644 index a6c8c9ac6..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/GraphiQlUIDisabled.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.autoconfiguration - -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.test.web.reactive.server.WebTestClient -import org.springframework.web.reactive.config.EnableWebFlux - -@AutoConfigureWebTestClient -@EnableWebFlux -@SpringBootTest( - classes = [ - DgsWebFluxAutoConfiguration::class, - DgsAutoConfiguration::class, - WebRequestTestWithCustomEndpoint.ExampleImplementation::class, - ], - properties = ["dgs.graphql.graphiql.enabled=false"], -) -class GraphiQlUIDisabled { - @Autowired - lateinit var webTestClient: WebTestClient - - @Test - fun `GraphiQL should not be available when disabled`() { - webTestClient - .get() - .uri("/graphiql/index.html") - .exchange() - .expectStatus() - .isNotFound - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/WebRequestTestWithCustomContext.kt b/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/WebRequestTestWithCustomContext.kt deleted file mode 100644 index 1fc02d926..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/WebRequestTestWithCustomContext.kt +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.autoconfiguration - -import com.netflix.graphql.dgs.* -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import com.netflix.graphql.dgs.context.DgsContext -import com.netflix.graphql.dgs.reactive.DgsReactiveCustomContextBuilderWithRequest -import graphql.language.FieldDefinition -import graphql.language.ObjectTypeDefinition -import graphql.language.TypeName -import graphql.schema.idl.TypeDefinitionRegistry -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.http.HttpHeaders -import org.springframework.stereotype.Component -import org.springframework.test.web.reactive.server.WebTestClient -import org.springframework.web.bind.annotation.RequestHeader -import org.springframework.web.reactive.config.EnableWebFlux -import org.springframework.web.reactive.function.server.ServerRequest -import reactor.core.publisher.Mono - -@AutoConfigureWebTestClient -@EnableWebFlux -@SpringBootTest( - classes = [ - DgsWebFluxAutoConfiguration::class, - DgsAutoConfiguration::class, - WebRequestTestWithCustomContext.ExampleImplementation::class, - WebRequestTestWithCustomContext.MyContextBuilder::class, - ], -) -class WebRequestTestWithCustomContext { - @Autowired - lateinit var webTestClient: WebTestClient - - @Test - fun `A simple request should execute correctly`() { - webTestClient - .post() - .uri("/graphql") - .bodyValue( - """ - {"query": "{hello}"} - """.trimIndent(), - ).exchange() - .expectBody() - .jsonPath("data.hello") - .isEqualTo("Hello, DGS") - } - - @Test - fun `Reactive custom context should be available`() { - webTestClient - .post() - .uri("/graphql") - .header("myheader", "DGS") - .bodyValue( - """ - {"query": "{withContext}"} - """.trimIndent(), - ).exchange() - .expectBody() - .jsonPath("data.withContext") - .isEqualTo("DGS") - } - - @Test - fun `@RequestHeader should receive HTTP header`() { - webTestClient - .post() - .uri("/graphql") - .header("myheader", "DGS") - .bodyValue( - """ - {"query": "{withHeader}"} - """.trimIndent(), - ).exchange() - .expectBody() - .jsonPath("data.withHeader") - .isEqualTo("DGS") - } - - @DgsComponent - class ExampleImplementation { - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry { - val newRegistry = TypeDefinitionRegistry() - - val query = - ObjectTypeDefinition - .newObjectTypeDefinition() - .name("Query") - .fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("hello") - .type(TypeName("String")) - .build(), - ).fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("withContext") - .type(TypeName("String")) - .build(), - ).fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("withHeader") - .type(TypeName("String")) - .build(), - ).build() - newRegistry.add(query) - - return newRegistry - } - - @DgsQuery - fun hello(): String = "Hello, DGS" - - @DgsQuery - fun withContext(dgsDataFetchingEnvironment: DgsDataFetchingEnvironment): String = - DgsContext.getCustomContext(dgsDataFetchingEnvironment) - - @DgsQuery - fun withHeader( - @RequestHeader myheader: String, - ): String = myheader - } - - @Component - class MyContextBuilder : DgsReactiveCustomContextBuilderWithRequest { - override fun build( - extensions: Map?, - headers: HttpHeaders?, - serverRequest: ServerRequest?, - ): Mono = Mono.just(serverRequest?.headers()?.firstHeader("myheader") ?: "") - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/WebRequestTestWithCustomEndpoint.kt b/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/WebRequestTestWithCustomEndpoint.kt deleted file mode 100644 index 20d16d7c7..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/WebRequestTestWithCustomEndpoint.kt +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.autoconfiguration - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsQuery -import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import graphql.language.FieldDefinition -import graphql.language.ObjectTypeDefinition -import graphql.language.TypeName -import graphql.schema.idl.TypeDefinitionRegistry -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.test.web.reactive.server.WebTestClient -import org.springframework.web.reactive.config.EnableWebFlux - -@AutoConfigureWebTestClient -@EnableWebFlux -@SpringBootTest( - classes = [ - DgsWebFluxAutoConfiguration::class, - DgsAutoConfiguration::class, - WebRequestTestWithCustomEndpoint.ExampleImplementation::class, - ], - properties = ["dgs.graphql.path=/api"], -) -class WebRequestTestWithCustomEndpoint { - @Autowired - lateinit var webTestClient: WebTestClient - - @Test - fun `A simple request should execute correctly when no custom context builder is available`() { - webTestClient - .post() - .uri("/api") - .bodyValue( - """ - {"query": "{hello}"} - """.trimIndent(), - ).exchange() - .expectBody() - .jsonPath("data.hello") - .isEqualTo("Hello, DGS") - } - - @DgsComponent - class ExampleImplementation { - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry { - val newRegistry = TypeDefinitionRegistry() - - val query = - ObjectTypeDefinition - .newObjectTypeDefinition() - .name("Query") - .fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("hello") - .type(TypeName("String")) - .build(), - ).build() - newRegistry.add(query) - - return newRegistry - } - - @DgsQuery - fun hello(): String = "Hello, DGS" - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/WebRequestTestWithoutCustomContext.kt b/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/WebRequestTestWithoutCustomContext.kt deleted file mode 100644 index 13843f36b..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/WebRequestTestWithoutCustomContext.kt +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.autoconfiguration - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsQuery -import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import graphql.language.FieldDefinition -import graphql.language.ObjectTypeDefinition -import graphql.language.TypeName -import graphql.schema.idl.TypeDefinitionRegistry -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.test.web.reactive.server.WebTestClient -import org.springframework.web.reactive.config.EnableWebFlux - -@AutoConfigureWebTestClient -@EnableWebFlux -@SpringBootTest( - classes = [ - DgsWebFluxAutoConfiguration::class, - DgsAutoConfiguration::class, - WebRequestTestWithoutCustomContext.ExampleImplementation::class, - ], -) -class WebRequestTestWithoutCustomContext { - @Autowired - lateinit var webTestClient: WebTestClient - - @Test - fun `A simple request should execute correctly when no custom context builder is available`() { - webTestClient - .post() - .uri("/graphql") - .bodyValue( - """ - {"query": "{hello}"} - """.trimIndent(), - ).exchange() - .expectBody() - .jsonPath("data.hello") - .isEqualTo("Hello, DGS") - } - - @DgsComponent - class ExampleImplementation { - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry { - val newRegistry = TypeDefinitionRegistry() - - val query = - ObjectTypeDefinition - .newObjectTypeDefinition() - .name("Query") - .fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("hello") - .type(TypeName("String")) - .build(), - ).build() - newRegistry.add(query) - - return newRegistry - } - - @DgsQuery - fun hello(): String = "Hello, DGS" - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/WebsocketSubscriptionsGraphQLTransportWSTest.kt b/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/WebsocketSubscriptionsGraphQLTransportWSTest.kt deleted file mode 100644 index dadfa5daa..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/WebsocketSubscriptionsGraphQLTransportWSTest.kt +++ /dev/null @@ -1,385 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.autoconfiguration - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsSubscription -import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import com.netflix.graphql.types.subscription.websockets.CloseCode -import com.netflix.graphql.types.subscription.websockets.Message -import com.netflix.graphql.types.subscription.websockets.MessageType -import graphql.schema.idl.SchemaParser -import graphql.schema.idl.TypeDefinitionRegistry -import org.junit.jupiter.api.Test -import org.reactivestreams.Publisher -import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration -import org.springframework.boot.autoconfigure.web.reactive.ReactiveWebServerFactoryAutoConfiguration -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.boot.test.web.server.LocalServerPort -import org.springframework.core.ResolvableType -import org.springframework.core.io.buffer.DataBuffer -import org.springframework.core.io.buffer.DataBufferUtils -import org.springframework.http.codec.json.Jackson2JsonDecoder -import org.springframework.http.codec.json.Jackson2JsonEncoder -import org.springframework.util.MimeTypeUtils -import org.springframework.web.reactive.config.EnableWebFlux -import org.springframework.web.reactive.socket.CloseStatus -import org.springframework.web.reactive.socket.WebSocketHandler -import org.springframework.web.reactive.socket.WebSocketMessage -import org.springframework.web.reactive.socket.WebSocketSession -import org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient -import org.springframework.web.reactive.socket.client.WebSocketClient -import reactor.core.publisher.Flux -import reactor.core.publisher.Mono -import reactor.core.publisher.Sinks -import reactor.test.StepVerifier -import java.net.URI -import java.time.Duration - -@EnableWebFlux -@SpringBootTest( - classes = [ - HttpHandlerAutoConfiguration::class, - ReactiveWebServerFactoryAutoConfiguration::class, - WebFluxAutoConfiguration::class, - DgsWebFluxAutoConfiguration::class, - DgsAutoConfiguration::class, - WebsocketSubscriptionsGraphQLTransportWSTest.ExampleSubscriptionImplementation::class, - ], - webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, -) -open class WebsocketSubscriptionsGraphQLTransportWSTest( - @param:LocalServerPort val port: Int, -) { - @Test - fun `Basic subscription flow`() { - val client: WebSocketClient = ReactorNettyWebSocketClient() - val url = URI("ws://localhost:$port/subscriptions") - val output: Sinks.Many = Sinks.many().replay().all() - - val query = "subscription {ticker}" - val execute = clientExecute(client, url, output, query, null) - StepVerifier.create(execute).expectComplete().verify() - - StepVerifier - .create(output.asFlux().map { (it as Message.NextMessage).payload.toString() }) - .expectNext("ExecutionResult(data={ticker=1}, errors=[])") - .expectNext("ExecutionResult(data={ticker=2}, errors=[])") - .expectNext("ExecutionResult(data={ticker=3}, errors=[])") - .verifyComplete() - } - - @Test - fun `Subscription with error flow`() { - val client: WebSocketClient = ReactorNettyWebSocketClient() - val url = URI("ws://localhost:$port/subscriptions") - val output: Sinks.Many = Sinks.many().replay().all() - - val query = "subscription {withError}" - val execute = clientExecute(client, url, output, query, null) - - StepVerifier.create(execute).expectComplete().verify() - - StepVerifier - .create( - output.asFlux().map { - if (it.type == - MessageType.NEXT - ) { - (it as Message.NextMessage).payload.toString() - } else { - (it as Message.ErrorMessage).payload.toString() - } - }, - ).expectNext("ExecutionResult(data={withError=1}, errors=[])") - .expectNext("ExecutionResult(data={withError=2}, errors=[])") - .expectNext("ExecutionResult(data={withError=3}, errors=[])") - .expectNext("[{message=Broken producer, locations=[], errorType=DataFetchingException, path=null, extensions=null}]") - .verifyError() - } - - @Test - fun `Client stops subscription`() { - val client: WebSocketClient = ReactorNettyWebSocketClient() - val url = URI("ws://localhost:$port/subscriptions") - val output: Sinks.Many = Sinks.many().replay().all() - - val query = "subscription {withDelay}" - val execute = clientExecute(client, url, output, query, 2) - - StepVerifier.create(execute).expectComplete().verify() - - StepVerifier - .create(output.asFlux().map { (it as Message.NextMessage).payload.toString() }) - .expectNext("ExecutionResult(data={withDelay=1}, errors=[])") - .expectNext("ExecutionResult(data={withDelay=2}, errors=[])") - .verifyComplete() - } - - @Test - fun `Multiple connection init error`() { - val client: WebSocketClient = ReactorNettyWebSocketClient() - val url = URI("ws://localhost:$port/subscriptions") - val output: Sinks.Many = Sinks.many().replay().all() - - val query = "subscription {ticker}" - val execute = clientExecute(client, url, output, query, sendMultipleConnectionInit = true) - StepVerifier.create(execute).expectComplete().verify() - - StepVerifier - .create(output.asFlux().map {}) - .expectErrorMatches { e -> e is CustomCloseException && e.closeCode == CloseCode.TooManyInitialisationRequests.code } - .verify() - } - - @Test - fun `Delayed connection init error`() { - val client: WebSocketClient = ReactorNettyWebSocketClient() - val url = URI("ws://localhost:$port/subscriptions") - val output: Sinks.Many = Sinks.many().replay().all() - val execute = clientExecuteDelayedConnectionInit(client, url, output) - val timeout = DgsWebfluxConfigurationProperties.DEFAULT_CONNECTION_INIT_TIMEOUT.trimEnd('s').toLong() + 2 - StepVerifier - .withVirtualTime { execute } - .thenAwait(Duration.ofSeconds(timeout)) - .expectComplete() - .verify() - - StepVerifier - .create(output.asFlux().map {}) - .expectErrorMatches { e -> e is CustomCloseException && e.closeCode == CloseCode.ConnectionInitialisationTimeout.code } - .verify() - } - - @Test - fun `Multiple subscriptions error`() { - val client: WebSocketClient = ReactorNettyWebSocketClient() - val url = URI("ws://localhost:$port/subscriptions") - val output: Sinks.Many = Sinks.many().replay().all() - - val query = "subscription {tickerRunning}" - val execute = clientExecute(client, url, output, query, sendDuplicateSubscriptionRequest = true) - StepVerifier.create(execute).expectComplete().verify() - - StepVerifier - .create(output.asFlux().map {}) - .expectErrorMatches { e -> e is CustomCloseException && e.closeCode == CloseCode.SubscriberAlreadyExists.code } - .verify() - } - - private fun registerCloseHandler( - session: WebSocketSession, - output: Sinks.Many, - ) { - session - .closeStatus() - .defaultIfEmpty(CloseStatus.NO_STATUS_CODE) - .doOnNext { closeStatus -> - if (!closeStatus.code.equals(CloseStatus.NORMAL)) { - output.emitError( - CustomCloseException(closeStatus.code), - Sinks.EmitFailureHandler.FAIL_FAST, - ) - } - }.doOnError { - output.emitError(RuntimeException(it.message), Sinks.EmitFailureHandler.FAIL_FAST) - }.log() - .subscribe() - } - - private fun clientExecuteDelayedConnectionInit( - client: WebSocketClient, - url: URI, - output: Sinks.Many, - ) = client.execute( - url, - object : WebSocketHandler { - override fun getSubProtocols(): List = listOf("graphql-transport-ws") - - override fun handle(session: WebSocketSession): Mono { - registerCloseHandler(session, output) - val pingMessage: Publisher = Mono.just(toWebsocketMessage(Message.PingMessage(), session)) - return session - .send(pingMessage) - .thenMany( - session.receive().flatMap { - Flux.just(toWebsocketMessage(Message.PingMessage(), session)) - }, - ).then() - } - }, - ) - - private fun clientExecute( - client: WebSocketClient, - url: URI, - output: Sinks.Many, - query: String, - stopAfter: Int? = null, - sendMultipleConnectionInit: Boolean = false, - sendDuplicateSubscriptionRequest: Boolean = false, - ) = client.execute( - url, - object : WebSocketHandler { - override fun getSubProtocols(): List = listOf("graphql-transport-ws") - - override fun handle(session: WebSocketSession): Mono { - registerCloseHandler(session, output) - - var counter = 0 - val clientConnectionInitRequest: Publisher = - if (sendMultipleConnectionInit) { - Flux.just( - toWebsocketMessage(Message.ConnectionInitMessage(), session), - toWebsocketMessage(Message.ConnectionInitMessage(), session), - ) - } else { - Mono.just(toWebsocketMessage(Message.ConnectionInitMessage(), session)) - } - return session - .send(clientConnectionInitRequest) - .thenMany( - session.receive().flatMap { message -> - val buffer: DataBuffer = DataBufferUtils.retain(message.payload) - val operationMessage: Message = - decoder.decode( - buffer, - resolvableType, - MimeTypeUtils.APPLICATION_JSON, - null, - ) as Message - - when (operationMessage) { - is Message.ConnectionAckMessage -> { - val subscriptionRequest: Publisher - if (sendDuplicateSubscriptionRequest) { - subscriptionRequest = - Flux.just( - toWebsocketMessage( - Message.SubscribeMessage( - id = "1", - Message.SubscribeMessage.Payload(query = query), - ), - session, - ), - toWebsocketMessage( - Message.SubscribeMessage( - id = "1", - Message.SubscribeMessage.Payload(query = query), - ), - session, - ), - ) - } else { - subscriptionRequest = - Mono.just( - toWebsocketMessage( - Message.SubscribeMessage( - id = "1", - Message.SubscribeMessage.Payload(query = query), - ), - session, - ), - ) - } - session.send(subscriptionRequest) - } - is Message.CompleteMessage -> { - output.emitComplete(Sinks.EmitFailureHandler.FAIL_FAST) - session.close() - } - is Message.ErrorMessage -> { - output.emitNext(operationMessage, Sinks.EmitFailureHandler.FAIL_FAST) - output.emitError(RuntimeException(), Sinks.EmitFailureHandler.FAIL_FAST) - session.close() - } - is Message.NextMessage -> { - counter += 1 - output.emitNext(operationMessage, Sinks.EmitFailureHandler.FAIL_FAST) - if (stopAfter != null && counter == stopAfter) { - Flux.just(operationMessage).flatMap { - output.emitComplete(Sinks.EmitFailureHandler.FAIL_FAST) - session.close() - } - } else { - Flux.just(operationMessage) - } - } - else -> { - Flux.empty() - } - } - }, - ).log() - .then() - } - }, - ) - - private val resolvableType = ResolvableType.forType(Message::class.java) - private val decoder = Jackson2JsonDecoder() - private val encoder = Jackson2JsonEncoder(decoder.objectMapper) - - private fun toWebsocketMessage( - operationMessage: Message, - session: WebSocketSession, - ): WebSocketMessage = - WebSocketMessage( - WebSocketMessage.Type.TEXT, - encoder.encodeValue( - operationMessage, - session.bufferFactory(), - resolvableType, - MimeTypeUtils.APPLICATION_JSON, - null, - ), - ) - - data class CustomCloseException( - val closeCode: Int, - ) : RuntimeException() - - @DgsComponent - class ExampleSubscriptionImplementation { - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry = - SchemaParser().parse( - """ - type Subscription { - ticker: Int - tickerRunning: Int - withError: Int - withDelay: Int - } - """.trimIndent(), - ) - - @DgsSubscription - fun tickerRunning(): Publisher = Flux.interval(Duration.ofSeconds(0), Duration.ofSeconds(1)).map { 100 } - - @DgsSubscription - fun ticker(): Publisher = Flux.just(1, 2, 3) - - @DgsSubscription - fun withError(): Publisher = Flux.just(1, 2, 3).concatWith(Flux.error(RuntimeException("Broken producer"))) - - @DgsSubscription - fun withDelay(): Publisher = Flux.just(1, 2).concatWith(Mono.delay(Duration.ofSeconds(1)).map { it.toInt() }) - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/WebsocketSubscriptionsGraphQLWSTest.kt b/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/WebsocketSubscriptionsGraphQLWSTest.kt deleted file mode 100644 index 7d2645fd5..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/WebsocketSubscriptionsGraphQLWSTest.kt +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.autoconfiguration - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsSubscription -import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import com.netflix.graphql.types.subscription.GQL_COMPLETE -import com.netflix.graphql.types.subscription.GQL_CONNECTION_ACK -import com.netflix.graphql.types.subscription.GQL_CONNECTION_INIT -import com.netflix.graphql.types.subscription.GQL_ERROR -import com.netflix.graphql.types.subscription.GQL_START -import com.netflix.graphql.types.subscription.OperationMessage -import graphql.schema.idl.SchemaParser -import graphql.schema.idl.TypeDefinitionRegistry -import org.junit.jupiter.api.Test -import org.reactivestreams.Publisher -import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration -import org.springframework.boot.autoconfigure.web.reactive.ReactiveWebServerFactoryAutoConfiguration -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.boot.test.web.server.LocalServerPort -import org.springframework.core.ResolvableType -import org.springframework.core.io.buffer.DataBuffer -import org.springframework.core.io.buffer.DataBufferUtils -import org.springframework.http.codec.json.Jackson2JsonDecoder -import org.springframework.http.codec.json.Jackson2JsonEncoder -import org.springframework.util.MimeTypeUtils -import org.springframework.web.reactive.config.EnableWebFlux -import org.springframework.web.reactive.socket.WebSocketHandler -import org.springframework.web.reactive.socket.WebSocketMessage -import org.springframework.web.reactive.socket.WebSocketSession -import org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient -import org.springframework.web.reactive.socket.client.WebSocketClient -import reactor.core.publisher.Flux -import reactor.core.publisher.Mono -import reactor.core.publisher.Sinks -import reactor.test.StepVerifier -import java.net.URI -import java.time.Duration - -@EnableWebFlux -@SpringBootTest( - classes = [ - HttpHandlerAutoConfiguration::class, - ReactiveWebServerFactoryAutoConfiguration::class, - WebFluxAutoConfiguration::class, - DgsWebFluxAutoConfiguration::class, - DgsAutoConfiguration::class, - WebsocketSubscriptionsGraphQLWSTest.ExampleSubscriptionImplementation::class, - ], - webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, -) -open class WebsocketSubscriptionsGraphQLWSTest( - @param:LocalServerPort val port: Int, -) { - @Test - fun `Basic subscription flow`() { - val client: WebSocketClient = ReactorNettyWebSocketClient() - val url = URI("ws://localhost:$port/subscriptions") - val output: Sinks.Many = Sinks.many().replay().all() - - val query = "subscription {ticker}" - val execute = clientExecute(client, url, output, query, null) - StepVerifier.create(execute).expectComplete().verify() - - StepVerifier - .create(output.asFlux().map { it.payload.toString() }) - .expectNext("DataPayload(data={ticker=1}, errors=[])") - .expectNext("DataPayload(data={ticker=2}, errors=[])") - .expectNext("DataPayload(data={ticker=3}, errors=[])") - .verifyComplete() - } - - @Test - fun `Subscription with error flow`() { - val client: WebSocketClient = ReactorNettyWebSocketClient() - val url = URI("ws://localhost:$port/subscriptions") - val output: Sinks.Many = Sinks.many().replay().all() - - val query = "subscription {withError}" - val execute = clientExecute(client, url, output, query, null) - - StepVerifier.create(execute).expectComplete().verify() - - StepVerifier - .create(output.asFlux().map { it.payload.toString() }) - .expectNext("DataPayload(data={withError=1}, errors=[])") - .expectNext("DataPayload(data={withError=2}, errors=[])") - .expectNext("DataPayload(data={withError=3}, errors=[])") - .expectNext("DataPayload(data=null, errors=[Broken producer])") - .verifyError() - } - - @Test - fun `Client stops subscription`() { - val client: WebSocketClient = ReactorNettyWebSocketClient() - val url = URI("ws://localhost:$port/subscriptions") - val output: Sinks.Many = Sinks.many().replay().all() - - val query = "subscription {withDelay}" - val execute = clientExecute(client, url, output, query, 2) - - StepVerifier.create(execute).expectComplete().verify() - - StepVerifier - .create(output.asFlux().map { it.payload.toString() }) - .expectNext("DataPayload(data={withDelay=1}, errors=[])") - .expectNext("DataPayload(data={withDelay=2}, errors=[])") - .verifyComplete() - } - - private fun clientExecute( - client: WebSocketClient, - url: URI, - output: Sinks.Many, - query: String, - stopAfter: Int? = null, - ) = client.execute( - url, - object : WebSocketHandler { - override fun getSubProtocols(): List = listOf("graphql-ws") - - override fun handle(session: WebSocketSession): Mono { - var counter = 0 - - return session - .send(Mono.just(toWebsocketMessage(OperationMessage(GQL_CONNECTION_INIT), session))) - .thenMany( - session.receive().flatMap { message -> - val buffer: DataBuffer = DataBufferUtils.retain(message.payload) - val operationMessage: OperationMessage = - decoder.decode( - buffer, - resolvableType, - MimeTypeUtils.APPLICATION_JSON, - null, - ) as OperationMessage - - when (operationMessage.type) { - GQL_CONNECTION_ACK -> { - session.send( - Mono.just( - toWebsocketMessage( - OperationMessage( - GQL_START, - mapOf("query" to query), - "1", - ), - session, - ), - ), - ) - } - GQL_COMPLETE -> { - output.emitComplete(Sinks.EmitFailureHandler.FAIL_FAST) - session.close() - } - GQL_ERROR -> { - output.emitNext(operationMessage, Sinks.EmitFailureHandler.FAIL_FAST) - output.emitError(RuntimeException(), Sinks.EmitFailureHandler.FAIL_FAST) - session.close() - } - else -> { - counter += 1 - output.emitNext(operationMessage, Sinks.EmitFailureHandler.FAIL_FAST) - if (stopAfter != null && counter == stopAfter) { - Flux.just(operationMessage).flatMap { - output.emitComplete(Sinks.EmitFailureHandler.FAIL_FAST) - session.close() - } - } else { - Flux.just(operationMessage) - } - } - } - }, - ).log() - .then() - } - }, - ) - - private val resolvableType = ResolvableType.forType(OperationMessage::class.java) - private val decoder = Jackson2JsonDecoder() - private val encoder = Jackson2JsonEncoder() - - private fun toWebsocketMessage( - operationMessage: OperationMessage, - session: WebSocketSession, - ): WebSocketMessage = - WebSocketMessage( - WebSocketMessage.Type.TEXT, - encoder.encodeValue( - operationMessage, - session.bufferFactory(), - resolvableType, - MimeTypeUtils.APPLICATION_JSON, - null, - ), - ) - - @DgsComponent - class ExampleSubscriptionImplementation { - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry = - SchemaParser().parse( - """ - type Subscription { - ticker: Int - withError: Int - withDelay: Int - } - """.trimIndent(), - ) - - @DgsSubscription - fun ticker(): Publisher = Flux.just(1, 2, 3) - - @DgsSubscription - fun withError(): Publisher = Flux.just(1, 2, 3).concatWith(Flux.error(RuntimeException("Broken producer"))) - - @DgsSubscription - fun withDelay(): Publisher = Flux.just(1, 2).concatWith(Mono.delay(Duration.ofSeconds(1)).map { it.toInt() }) - } -} diff --git a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/WebsocketSubscriptionsGraphQLWSTestCustomEndpoint.kt b/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/WebsocketSubscriptionsGraphQLWSTestCustomEndpoint.kt deleted file mode 100644 index 5fbad5deb..000000000 --- a/graphql-dgs-spring-webflux-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webflux/autoconfiguration/WebsocketSubscriptionsGraphQLWSTestCustomEndpoint.kt +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webflux.autoconfiguration - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsSubscription -import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import com.netflix.graphql.types.subscription.GQL_COMPLETE -import com.netflix.graphql.types.subscription.GQL_CONNECTION_ACK -import com.netflix.graphql.types.subscription.GQL_CONNECTION_INIT -import com.netflix.graphql.types.subscription.GQL_ERROR -import com.netflix.graphql.types.subscription.GQL_START -import com.netflix.graphql.types.subscription.OperationMessage -import graphql.schema.idl.SchemaParser -import graphql.schema.idl.TypeDefinitionRegistry -import org.junit.jupiter.api.Test -import org.reactivestreams.Publisher -import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration -import org.springframework.boot.autoconfigure.web.reactive.ReactiveWebServerFactoryAutoConfiguration -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.boot.test.web.server.LocalServerPort -import org.springframework.core.ResolvableType -import org.springframework.core.io.buffer.DataBuffer -import org.springframework.core.io.buffer.DataBufferUtils -import org.springframework.http.codec.json.Jackson2JsonDecoder -import org.springframework.http.codec.json.Jackson2JsonEncoder -import org.springframework.util.MimeTypeUtils -import org.springframework.web.reactive.config.EnableWebFlux -import org.springframework.web.reactive.socket.WebSocketHandler -import org.springframework.web.reactive.socket.WebSocketMessage -import org.springframework.web.reactive.socket.WebSocketSession -import org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient -import org.springframework.web.reactive.socket.client.WebSocketClient -import reactor.core.publisher.Flux -import reactor.core.publisher.Mono -import reactor.core.publisher.Sinks -import reactor.test.StepVerifier -import java.net.URI -import java.time.Duration - -@EnableWebFlux -@SpringBootTest( - classes = [ - HttpHandlerAutoConfiguration::class, - ReactiveWebServerFactoryAutoConfiguration::class, - WebFluxAutoConfiguration::class, - DgsWebFluxAutoConfiguration::class, - DgsAutoConfiguration::class, - WebsocketSubscriptionsGraphQLWSTestCustomEndpoint.ExampleSubscriptionImplementation::class, - ], - webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, - properties = ["dgs.graphql.websocket.path=/custom/subscriptions"], -) -open class WebsocketSubscriptionsGraphQLWSTestCustomEndpoint( - @param:LocalServerPort val port: Int, -) { - @Test - fun `Basic subscription flow using a custom endpoint`() { - val client: WebSocketClient = ReactorNettyWebSocketClient() - val url = URI("ws://localhost:$port/custom/subscriptions") - val output: Sinks.Many = Sinks.many().replay().all() - - val query = "subscription {ticker}" - val execute = clientExecute(client, url, output, query) - StepVerifier.create(execute).expectComplete().verify() - - StepVerifier - .create(output.asFlux().map { it.payload.toString() }) - .expectNext("DataPayload(data={ticker=1}, errors=[])") - .expectNext("DataPayload(data={ticker=2}, errors=[])") - .expectNext("DataPayload(data={ticker=3}, errors=[])") - .verifyComplete() - } - - @Test - fun `Subscription with error flow using a custom endpoint`() { - val client: WebSocketClient = ReactorNettyWebSocketClient() - val url = URI("ws://localhost:$port/custom/subscriptions") - val output: Sinks.Many = Sinks.many().replay().all() - - val query = "subscription {withError}" - val execute = clientExecute(client, url, output, query, null) - - StepVerifier.create(execute).expectComplete().verify() - - StepVerifier - .create(output.asFlux().map { it.payload.toString() }) - .expectNext("DataPayload(data={withError=1}, errors=[])") - .expectNext("DataPayload(data={withError=2}, errors=[])") - .expectNext("DataPayload(data={withError=3}, errors=[])") - .expectNext("DataPayload(data=null, errors=[Broken producer])") - .verifyError() - } - - private fun clientExecute( - client: WebSocketClient, - url: URI, - output: Sinks.Many, - query: String, - stopAfter: Int? = null, - ) = client.execute( - url, - object : WebSocketHandler { - override fun getSubProtocols(): List = listOf("graphql-ws") - - override fun handle(session: WebSocketSession): Mono { - var counter = 0 - - return session - .send(Mono.just(toWebsocketMessage(OperationMessage(GQL_CONNECTION_INIT), session))) - .thenMany( - session.receive().flatMap { message -> - val buffer: DataBuffer = DataBufferUtils.retain(message.payload) - val operationMessage: OperationMessage = - decoder.decode( - buffer, - resolvableType, - MimeTypeUtils.APPLICATION_JSON, - null, - ) as OperationMessage - - when (operationMessage.type) { - GQL_CONNECTION_ACK -> { - session.send( - Mono.just( - toWebsocketMessage( - OperationMessage( - GQL_START, - mapOf("query" to query), - "1", - ), - session, - ), - ), - ) - } - GQL_COMPLETE -> { - output.emitComplete(Sinks.EmitFailureHandler.FAIL_FAST) - session.close() - } - GQL_ERROR -> { - output.emitNext(operationMessage, Sinks.EmitFailureHandler.FAIL_FAST) - output.emitError(RuntimeException(), Sinks.EmitFailureHandler.FAIL_FAST) - session.close() - } - else -> { - counter += 1 - output.emitNext(operationMessage, Sinks.EmitFailureHandler.FAIL_FAST) - if (stopAfter != null && counter == stopAfter) { - Flux.just(operationMessage).flatMap { - output.emitComplete(Sinks.EmitFailureHandler.FAIL_FAST) - session.close() - } - } else { - Flux.just(operationMessage) - } - } - } - }, - ).log() - .then() - } - }, - ) - - private val resolvableType = ResolvableType.forType(OperationMessage::class.java) - private val decoder = Jackson2JsonDecoder() - private val encoder = Jackson2JsonEncoder() - - private fun toWebsocketMessage( - operationMessage: OperationMessage, - session: WebSocketSession, - ): WebSocketMessage = - WebSocketMessage( - WebSocketMessage.Type.TEXT, - encoder.encodeValue( - operationMessage, - session.bufferFactory(), - resolvableType, - MimeTypeUtils.APPLICATION_JSON, - null, - ), - ) - - @DgsComponent - class ExampleSubscriptionImplementation { - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry = - SchemaParser().parse( - """ - type Subscription { - ticker: Int - withError: Int - withDelay: Int - } - """.trimIndent(), - ) - - @DgsSubscription - fun ticker(): Publisher = Flux.just(1, 2, 3) - - @DgsSubscription - fun withError(): Publisher = Flux.just(1, 2, 3).concatWith(Flux.error(RuntimeException("Broken producer"))) - - @DgsSubscription - fun withDelay(): Publisher = Flux.just(1, 2).concatWith(Mono.delay(Duration.ofSeconds(1)).map { it.toInt() }) - } -} diff --git a/graphql-dgs-spring-webmvc-autoconfigure/build.gradle.kts b/graphql-dgs-spring-webmvc-autoconfigure/build.gradle.kts deleted file mode 100644 index 7c1261835..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/build.gradle.kts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -dependencies { - api(project(":graphql-dgs")) - api(project(":graphql-dgs-spring-webmvc")) - implementation("org.springframework.boot:spring-boot-starter") - implementation("org.springframework:spring-webmvc") - implementation("jakarta.servlet:jakarta.servlet-api") - implementation("com.fasterxml.jackson.module:jackson-module-kotlin") - implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310") - - - testImplementation(project(":graphql-dgs-spring-boot-oss-autoconfigure")) - testImplementation("org.springframework.boot:spring-boot-starter-web") - testImplementation("com.github.ben-manes.caffeine:caffeine") -} diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/DgsWebMvcAutoConfiguration.kt b/graphql-dgs-spring-webmvc-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/DgsWebMvcAutoConfiguration.kt deleted file mode 100644 index 1d77541a4..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/DgsWebMvcAutoConfiguration.kt +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webmvc.autoconfigure - -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule -import com.fasterxml.jackson.module.kotlin.KotlinModule -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.dgs.internal.DgsSchemaProvider -import com.netflix.graphql.dgs.internal.method.ArgumentResolver -import com.netflix.graphql.dgs.mvc.DefaultDgsGraphQLRequestHeaderValidator -import com.netflix.graphql.dgs.mvc.DgsGraphQLCSRFInstrumentation -import com.netflix.graphql.dgs.mvc.DgsGraphQLRequestHeaderValidator -import com.netflix.graphql.dgs.mvc.DgsRestController -import com.netflix.graphql.dgs.mvc.DgsRestSchemaJsonController -import com.netflix.graphql.dgs.mvc.GraphQLRequestContentTypePredicate -import com.netflix.graphql.dgs.mvc.GraphQLRequestHeaderValidationRule -import com.netflix.graphql.dgs.mvc.internal.method.HandlerMethodArgumentResolverAdapter -import org.springframework.beans.factory.ObjectProvider -import org.springframework.beans.factory.annotation.Qualifier -import org.springframework.beans.factory.config.ConfigurableBeanFactory -import org.springframework.boot.autoconfigure.AutoConfiguration -import org.springframework.boot.autoconfigure.condition.ConditionalOnClass -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty -import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication -import org.springframework.boot.context.properties.EnableConfigurationProperties -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration -import org.springframework.context.annotation.Import -import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder -import org.springframework.web.bind.support.WebDataBinderFactory -import org.springframework.web.method.annotation.RequestHeaderMapMethodArgumentResolver -import org.springframework.web.method.annotation.RequestHeaderMethodArgumentResolver -import org.springframework.web.method.annotation.RequestParamMapMethodArgumentResolver -import org.springframework.web.method.annotation.RequestParamMethodArgumentResolver -import org.springframework.web.servlet.DispatcherServlet -import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter -import org.springframework.web.servlet.mvc.method.annotation.ServletCookieValueMethodArgumentResolver -import org.springframework.web.servlet.mvc.method.annotation.ServletRequestDataBinderFactory - -@AutoConfiguration -@ConditionalOnWebApplication -@EnableConfigurationProperties(DgsWebMvcConfigurationProperties::class) -open class DgsWebMvcAutoConfiguration { - @Bean - @Qualifier("dgsObjectMapper") - @ConditionalOnMissingBean(name = ["dgsObjectMapper"]) - open fun dgsObjectMapper(): ObjectMapper = - Jackson2ObjectMapperBuilder - .json() - .modulesToInstall(KotlinModule.Builder().build(), JavaTimeModule()) - .build() - - @Bean - open fun dgsRestController( - dgsQueryExecutor: DgsQueryExecutor, - @Qualifier("dgsObjectMapper") objectMapper: ObjectMapper, - ): DgsRestController = DgsRestController(dgsQueryExecutor, objectMapper) - - @Configuration - @ConditionalOnClass(DispatcherServlet::class) - @ConditionalOnProperty(name = ["dgs.graphql.graphiql.enabled"], havingValue = "true", matchIfMissing = true) - @Import(GraphiQLConfigurer::class) - open class DgsGraphiQLConfiguration - - @Configuration - @ConditionalOnProperty(name = ["dgs.graphql.schema-json.enabled"], havingValue = "true", matchIfMissing = true) - open class DgsWebMvcSchemaJsonConfiguration { - @Bean - open fun dgsRestSchemaJsonController(dgsSchemaProvider: DgsSchemaProvider): DgsRestSchemaJsonController = - DgsRestSchemaJsonController(dgsSchemaProvider) - } - - @Configuration(proxyBeanMethods = false) - @ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET) - open class WebMvcArgumentHandlerConfiguration { - @Qualifier - private annotation class Dgs - - @Bean - @Dgs - open fun dgsWebDataBinderFactory( - @Qualifier("requestMappingHandlerAdapter") adapter: ObjectProvider, - ): WebDataBinderFactory = ServletRequestDataBinderFactory(listOf(), adapter.ifAvailable?.webBindingInitializer) - - @Bean - open fun requestHeaderMapResolver( - @Dgs dataBinderFactory: WebDataBinderFactory, - ): ArgumentResolver = HandlerMethodArgumentResolverAdapter(RequestHeaderMapMethodArgumentResolver(), dataBinderFactory) - - @Bean - open fun requestHeaderResolver( - beanFactory: ConfigurableBeanFactory, - @Dgs dataBinderFactory: WebDataBinderFactory, - ): ArgumentResolver = - HandlerMethodArgumentResolverAdapter( - RequestHeaderMethodArgumentResolver(beanFactory), - dataBinderFactory, - ) - - @Bean - open fun requestParamResolver( - @Dgs dataBinderFactory: WebDataBinderFactory, - ): ArgumentResolver = HandlerMethodArgumentResolverAdapter(RequestParamMethodArgumentResolver(false), dataBinderFactory) - - @Bean - open fun requestParamMapResolver( - @Dgs dataBinderFactory: WebDataBinderFactory, - ): ArgumentResolver = HandlerMethodArgumentResolverAdapter(RequestParamMapMethodArgumentResolver(), dataBinderFactory) - - @Bean - open fun cookieValueResolver( - beanFactory: ConfigurableBeanFactory, - @Dgs dataBinderFactory: WebDataBinderFactory, - ): ArgumentResolver = HandlerMethodArgumentResolverAdapter(ServletCookieValueMethodArgumentResolver(beanFactory), dataBinderFactory) - } - - @Configuration(proxyBeanMethods = false) - @ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET) - open class WebMvcHeaderValidationConfiguration { - @Bean - @ConditionalOnMissingBean - open fun defaultOSSDgsGraphQLRequestHeadersValidator( - validationRulesProvider: ObjectProvider, - contentTypePredicatesProviders: ObjectProvider, - ): DgsGraphQLRequestHeaderValidator = - DefaultDgsGraphQLRequestHeaderValidator( - validationRules = validationRulesProvider.orderedStream().toList(), - contentTypePredicates = contentTypePredicatesProviders.orderedStream().toList(), - ) - - @Bean - open fun graphQLRequestContentTypePredicates(): List = - GraphQLRequestContentTypePredicate.RECOMMENDED_GRAPHQL_CONTENT_TYPE_PREDICATES - - @Bean - @ConditionalOnProperty("dgs.graphql.header.validation.enabled", havingValue = "true", matchIfMissing = true) - open fun graphqlRequestHeaderValidationRules(): List = - DgsGraphQLRequestHeaderValidator.RECOMMENDED_GRAPHQL_REQUEST_HEADERS_VALIDATOR - - @Bean - @ConditionalOnProperty("dgs.graphql.prevent-mutation-over-get.enabled", havingValue = "true", matchIfMissing = true) - open fun csrfCheckInstrumentation(): DgsGraphQLCSRFInstrumentation = DgsGraphQLCSRFInstrumentation() - } -} diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/DgsWebMvcConfigurationProperties.kt b/graphql-dgs-spring-webmvc-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/DgsWebMvcConfigurationProperties.kt deleted file mode 100644 index 23f65c04a..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/DgsWebMvcConfigurationProperties.kt +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webmvc.autoconfigure - -import jakarta.annotation.PostConstruct -import org.springframework.boot.context.properties.ConfigurationProperties -import org.springframework.boot.context.properties.NestedConfigurationProperty -import org.springframework.boot.context.properties.bind.DefaultValue - -/** - * Configuration properties for DGS web controllers. - */ -@ConfigurationProperties(prefix = "dgs.graphql") -@Suppress("ConfigurationProperties") -data class DgsWebMvcConfigurationProperties( - /** Path to the GraphQL endpoint without trailing slash. */ - @DefaultValue("/graphql") var path: String = "/graphql", - @NestedConfigurationProperty var graphiql: DgsGraphiQLConfigurationProperties = DgsGraphiQLConfigurationProperties(), - @NestedConfigurationProperty var schemaJson: DgsSchemaJsonConfigurationProperties = DgsSchemaJsonConfigurationProperties(), -) { - /** - * Configuration properties for the GraphiQL endpoint. - */ - data class DgsGraphiQLConfigurationProperties( - /** Path to the GraphiQL endpoint without trailing slash. */ - @DefaultValue("/graphiql") var path: String = "/graphiql", - /** GraphiQL title */ - @DefaultValue("Simple GraphiQL Example") var title: String = "Simple GraphiQL Example", - ) - - /** - * Configuration properties for the schema-json endpoint. - */ - data class DgsSchemaJsonConfigurationProperties( - /** Path to the schema-json endpoint without trailing slash. */ - @DefaultValue("/schema.json") var path: String = "/schema.json", - ) - - @PostConstruct - fun validatePaths() { - validatePath(this.path, "dgs.graphql.path") - validatePath(this.graphiql.path, "dgs.graphql.graphiql.path") - validatePath(this.schemaJson.path, "dgs.graphql.schema-json.path") - } - - private fun validatePath( - path: String, - pathProperty: String, - ) { - if (path != "/" && (!path.startsWith("/") || path.endsWith("/"))) { - throw IllegalArgumentException("$pathProperty must start with '/' and not end with '/' but was '$path'") - } - } -} diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLConfigurer.kt b/graphql-dgs-spring-webmvc-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLConfigurer.kt deleted file mode 100644 index ba785cf20..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLConfigurer.kt +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webmvc.autoconfigure - -import com.netflix.graphql.dgs.webmvc.autoconfigure.GraphiQLConfigurer.Constants.PATH_TO_GRAPHIQL_INDEX_HTML -import jakarta.servlet.ServletContext -import jakarta.servlet.http.HttpServletRequest -import org.slf4j.Logger -import org.slf4j.LoggerFactory -import org.springframework.boot.context.properties.EnableConfigurationProperties -import org.springframework.context.annotation.Configuration -import org.springframework.core.io.Resource -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry -import org.springframework.web.servlet.config.annotation.ViewControllerRegistry -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer -import org.springframework.web.servlet.resource.PathResourceResolver -import org.springframework.web.servlet.resource.ResourceTransformer -import org.springframework.web.servlet.resource.ResourceTransformerChain -import org.springframework.web.servlet.resource.TransformedResource -import java.io.BufferedReader -import java.io.IOException -import java.nio.charset.StandardCharsets - -@Configuration(proxyBeanMethods = false) -@EnableConfigurationProperties(DgsWebMvcConfigurationProperties::class) -@Suppress("SpringJavaInjectionPointsAutowiringInspection") -open class GraphiQLConfigurer( - private val configProps: DgsWebMvcConfigurationProperties, - private val servletContext: ServletContext, -) : WebMvcConfigurer { - override fun addViewControllers(registry: ViewControllerRegistry) { - registry.addViewController(configProps.graphiql.path).setViewName("forward:$PATH_TO_GRAPHIQL_INDEX_HTML") - registry.addViewController("${configProps.graphiql.path}/").setViewName("forward:$PATH_TO_GRAPHIQL_INDEX_HTML") - } - - override fun addResourceHandlers(registry: ResourceHandlerRegistry) { - val graphqlPath = servletContext.contextPath + configProps.path - logger.info("Configuring GraphiQL to use GraphQL endpoint at '{}'", graphqlPath) - registry - .addResourceHandler("/graphiql/**") - .addResourceLocations("classpath:/graphiql/") - .setCachePeriod(3600) - .resourceChain(true) - .addResolver(PathResourceResolver()) - .addTransformer( - TokenReplacingTransformer( - mapOf( - "" to graphqlPath, - "" to configProps.graphiql.title, - ), - ), - ) - } - - class TokenReplacingTransformer( - private val replaceMap: Map, - ) : ResourceTransformer { - @Throws(IOException::class) - override fun transform( - request: HttpServletRequest, - resource: Resource, - transformerChain: ResourceTransformerChain, - ): Resource { - if (request.requestURI.orEmpty().endsWith(PATH_TO_GRAPHIQL_INDEX_HTML)) { - var content = resource.inputStream.bufferedReader().use(BufferedReader::readText) - replaceMap.forEach { content = content.replace(it.key, it.value) } - return TransformedResource(resource, content.toByteArray(StandardCharsets.UTF_8)) - } - return resource - } - } - - companion object { - private val logger: Logger = LoggerFactory.getLogger(GraphiQLConfigurer::class.java) - } - - object Constants { - const val PATH_TO_GRAPHIQL_INDEX_HTML = "/graphiql/index.html" - } -} diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/graphql-dgs-spring-webmvc-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json deleted file mode 100644 index b561728a2..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "properties": [ - { - "name": "dgs.graphql.schema-json.enabled", - "type": "java.lang.Boolean", - "description": "Enables schema-json endpoint functionality.", - "defaultValue": "true" - }, - { - "name": "dgs.graphql.graphiql.enabled", - "type": "java.lang.Boolean", - "description": "Enables GraphiQL functionality.", - "defaultValue": "true" - }, - { - "name": "dgs.graphql.header.validation.enabled", - "type": "java.lang.Boolean", - "description": "Enables recommended GDS GraphQL HTTP Header validation rules.", - "defaultValue": "true" - }, - { - "name": "dgs.graphql.graphiql.title", - "type": "java.lang.String", - "description": "Customize the GraphiQL title", - "defaultValue": "Simple GraphiQL Example" - } - ] -} diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/graphql-dgs-spring-webmvc-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index b434ae68d..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1 +0,0 @@ -com.netflix.graphql.dgs.webmvc.autoconfigure.DgsWebMvcAutoConfiguration diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/main/resources/graphiql/index.html b/graphql-dgs-spring-webmvc-autoconfigure/src/main/resources/graphiql/index.html deleted file mode 100644 index d337427f4..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/main/resources/graphiql/index.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - <DGS_GRAPHIQL_TITLE> - - - -
- - - - - - - - - diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/MalformedQueryContentTest.kt b/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/MalformedQueryContentTest.kt deleted file mode 100644 index ae38beae2..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/MalformedQueryContentTest.kt +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webmvc - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry -import graphql.schema.idl.SchemaParser -import graphql.schema.idl.TypeDefinitionRegistry -import org.hamcrest.core.StringStartsWith -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.autoconfigure.EnableAutoConfiguration -import org.springframework.boot.autoconfigure.SpringBootApplication -import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.context.annotation.ComponentScan -import org.springframework.context.annotation.FilterType -import org.springframework.http.MediaType -import org.springframework.test.web.servlet.MockMvc -import org.springframework.test.web.servlet.request.MockMvcRequestBuilders -import org.springframework.test.web.servlet.result.MockMvcResultMatchers.content -import org.springframework.test.web.servlet.result.MockMvcResultMatchers.status - -@SpringBootTest -@AutoConfigureMockMvc -@EnableAutoConfiguration -class MalformedQueryContentTest { - @Autowired - lateinit var mvc: MockMvc - - @Test - fun `Should provide a valid content-type`() { - val uriBuilder = - MockMvcRequestBuilders - .post("/graphql") - .content(" ") - - mvc - .perform(uriBuilder) - .andExpect(status().isUnsupportedMediaType) - } - - @Test - fun `Should return a bad request error if the POST request has no content`() { - val uriBuilder = - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content(" ") - - mvc - .perform(uriBuilder) - .andExpect(status().isBadRequest) - .andExpect(content().string("Invalid query - No content to map to input.")) - } - - @Test - fun `Should return a bad request error if the POST request has a malformed query`() { - val uriBuilder = - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("{") - - mvc - .perform(uriBuilder) - .andExpect(status().isBadRequest) - .andExpect(content().string(StringStartsWith.startsWith("Invalid query -"))) - } - - @Test - fun `Should return a GraphQL Error if the query is empty`() { - val uriBuilder = - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("{ }") - - mvc - .perform(uriBuilder) - .andExpect(status().isBadRequest) - .andExpect( - content().json( - """ - { - "errors":[ - { - "message":"GraphQL operations must contain a non-empty `query`.", - "extensions":{ - "class":"com.netflix.graphql.dgs.exceptions.DgsBadRequestException", - "errorType":"BAD_REQUEST" - } - } - ] - } - """.trimIndent(), - ), - ) - } - - @SpringBootApplication(proxyBeanMethods = false, scanBasePackages = []) - @ComponentScan( - useDefaultFilters = false, - includeFilters = [ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = [])], - ) - @SuppressWarnings("unused") - open class LocalApp { - @DgsComponent - class ExampleImplementation { - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry = SchemaParser().parse("type Query{ } ") - } - } -} diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/apq/DgsWebMVCAutomatedPersistedQueriesSmokeTest.kt b/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/apq/DgsWebMVCAutomatedPersistedQueriesSmokeTest.kt deleted file mode 100644 index 440092cd9..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/apq/DgsWebMVCAutomatedPersistedQueriesSmokeTest.kt +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webmvc.apq - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry -import graphql.schema.idl.SchemaParser -import graphql.schema.idl.TypeDefinitionRegistry -import org.junit.jupiter.api.MethodOrderer -import org.junit.jupiter.api.Order -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.TestMethodOrder -import org.junit.jupiter.api.parallel.Execution -import org.junit.jupiter.api.parallel.ExecutionMode -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.autoconfigure.EnableAutoConfiguration -import org.springframework.boot.autoconfigure.SpringBootApplication -import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.context.annotation.ComponentScan -import org.springframework.context.annotation.FilterType -import org.springframework.http.MediaType -import org.springframework.test.web.servlet.MockMvc -import org.springframework.test.web.servlet.request.MockMvcRequestBuilders -import org.springframework.test.web.servlet.result.MockMvcResultMatchers.content -import org.springframework.test.web.servlet.result.MockMvcResultMatchers.status - -@SpringBootTest( - properties = [ - "debug:true", - "dgs.graphql.apq.enabled:true", - ], -) -@AutoConfigureMockMvc -@EnableAutoConfiguration -@Execution(ExecutionMode.SAME_THREAD) -@TestMethodOrder(MethodOrderer.OrderAnnotation::class) -class DgsWebMVCAutomatedPersistedQueriesSmokeTest { - @Autowired - lateinit var mvc: MockMvc - - @Test - @Order(0) - fun `The demo app is able to start`() { - } - - @Test - @Order(1) - fun `Attempt to execute a POST Request with a known hash`() { - val uriBuilder = - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content( - """ - |{ - | "extensions":{ - | "persistedQuery":{ - | "version":1, - | "sha256Hash":"ecf4edb46db40b5132295c0291d62fb65d6759a9eedfa4d5d612dd5ec54a6b38" - | } - | } - | } - | - """.trimMargin(), - ) - mvc - .perform(uriBuilder) - .andExpect(status().isOk) - .andExpect( - content().json( - """ - |{ - | "errors":[ - | { - | "message":"PersistedQueryNotFound", - | "locations":[], - | "extensions":{ - | "persistedQueryId":"ecf4edb46db40b5132295c0291d62fb65d6759a9eedfa4d5d612dd5ec54a6b38", - | "generatedBy":"graphql-java", - | "classification":"PersistedQueryNotFound" - | } - | } - | ] - | } - | - """.trimMargin(), - ), - ) - } - - @Test - @Order(2) - fun `Execute a POST Request with a known hash and query`() { - val uriBuilder = - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content( - """ - |{ - | "query": "{__typename}", - | "extensions":{ - | "persistedQuery":{ - | "version":1, - | "sha256Hash":"ecf4edb46db40b5132295c0291d62fb65d6759a9eedfa4d5d612dd5ec54a6b38" - | } - | } - | } - | - """.trimMargin(), - ) - mvc - .perform(uriBuilder) - .andExpect(status().isOk) - .andExpect( - content().json( - """ - | { - | "data": { - | "__typename":"Query" - | } - | } - | - """.trimMargin(), - ), - ) - } - - @Test - @Order(3) - fun `Execute a POST Request with a known hash once the query was registered`() { - val uriBuilder = - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content( - """ - |{ - | "extensions":{ - | "persistedQuery":{ - | "version":1, - | "sha256Hash":"ecf4edb46db40b5132295c0291d62fb65d6759a9eedfa4d5d612dd5ec54a6b38" - | } - | } - | } - | - """.trimMargin(), - ) - mvc - .perform(uriBuilder) - .andExpect(status().isOk) - .andExpect( - content().json( - """ - | { - | "data": { - | "__typename":"Query" - | } - | } - | - """.trimMargin(), - ), - ) - } - - @SpringBootApplication(proxyBeanMethods = false, scanBasePackages = []) - @ComponentScan( - useDefaultFilters = false, - includeFilters = [ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = [])], - ) - @SuppressWarnings("unused") - open class LocalApp { - @DgsComponent - class ExampleImplementation { - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry { - val schemaParser = SchemaParser() - - val gqlSchema = - """ - |type Query{ - |} - """.trimMargin() - return schemaParser.parse(gqlSchema) - } - } - } -} diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/DgsWebMvcAutoConfigurationTest.kt b/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/DgsWebMvcAutoConfigurationTest.kt deleted file mode 100644 index a9dacd7d9..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/DgsWebMvcAutoConfigurationTest.kt +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webmvc.autoconfigure - -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule -import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.dgs.internal.DgsSchemaProvider -import com.netflix.graphql.dgs.internal.SchemaProviderResult -import com.netflix.graphql.dgs.mvc.DgsRestController -import com.netflix.graphql.dgs.mvc.DgsRestSchemaJsonController -import graphql.ExecutionResultImpl -import graphql.Scalars -import graphql.schema.GraphQLFieldDefinition -import graphql.schema.GraphQLObjectType -import graphql.schema.GraphQLSchema -import graphql.schema.idl.RuntimeWiring -import io.mockk.every -import io.mockk.mockk -import org.assertj.core.api.Assertions.* -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Qualifier -import org.springframework.boot.autoconfigure.AutoConfigurations -import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration -import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration -import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration -import org.springframework.boot.test.context.runner.WebApplicationContextRunner -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration -import org.springframework.http.MediaType -import org.springframework.test.web.servlet.request.MockMvcRequestBuilders -import org.springframework.test.web.servlet.result.MockMvcResultMatchers -import org.springframework.test.web.servlet.setup.MockMvcBuilders - -class DgsWebMvcAutoConfigurationTest { - private val context = - WebApplicationContextRunner() - .withConfiguration(AutoConfigurations.of(DgsWebMvcAutoConfiguration::class.java)) - .withUserConfiguration(MockUserConfiguration::class.java) - - @Test - fun objectMapperAvailable() { - context.run { ctx -> - assertThat(ctx).hasSingleBean(ObjectMapper::class.java) - assertThat(ctx).getBeans(ObjectMapper::class.java).containsKey("dgsObjectMapper") - // Expecting the JavaTimeModule from the dgsObjectMapper provided via MockUserConfiguration - val modules = - ctx - .getBeansOfType(ObjectMapper::class.java)["dgsObjectMapper"] - ?.registeredModuleIds - ?.contains(MockUserConfiguration.jacksonJavaTimeModule.moduleName) - assertThat(modules).isTrue() - } - } - - @Test - fun graphqlControllerAvailable() { - context.run { ctx -> - assertThat(ctx).hasSingleBean(DgsRestController::class.java) - } - } - - @Test - fun graphiqlAvailableWhenEnabledPropertyNotSpecified() { - context.run { ctx -> - assertThat(ctx).hasSingleBean(GraphiQLConfigurer::class.java) - } - } - - @Test - fun graphiqlAvailableWhenEnabledPropertySetToTrue() { - context.withPropertyValues("dgs.graphql.graphiql.enabled: true").run { ctx -> - assertThat(ctx).hasSingleBean(GraphiQLConfigurer::class.java) - } - } - - @Test - fun graphiqlNotAvailableWhenEnabledPropertySetToFalse() { - context.withPropertyValues("dgs.graphql.graphiql.enabled: false").run { ctx -> - assertThat(ctx).doesNotHaveBean(GraphiQLConfigurer::class.java) - } - } - - @Test - fun schemaJsonControllerAvailableWhenEnabledPropertyNotSpecified() { - context.run { ctx -> - assertThat(ctx) - .hasSingleBean(DgsRestSchemaJsonController::class.java) - } - } - - @Test - fun schemaJsonControllerAvailableWhenEnabledPropertySetToTrue() { - context.withPropertyValues("dgs.graphql.schema-json.enabled: true").run { ctx -> - assertThat(ctx) - .hasSingleBean(DgsRestSchemaJsonController::class.java) - } - } - - @Test - fun schemaJsonControllerNotAvailableWhenEnabledPropertySetToFalse() { - context.withPropertyValues("dgs.graphql.schema-json.enabled: false").run { ctx -> - assertThat(ctx) - .doesNotHaveBean(DgsRestSchemaJsonController::class.java) - } - } - - @Test - fun graphqlControllerMappedToDefaultPath() { - context - .withConfiguration( - AutoConfigurations.of( - JacksonAutoConfiguration::class.java, - WebMvcAutoConfiguration::class.java, - DispatcherServletAutoConfiguration::class.java, - ), - ).run { ctx -> - val mockMvc = MockMvcBuilders.webAppContextSetup(ctx).build() - mockMvc - .perform( - MockMvcRequestBuilders - .get("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("{\"query\": \"{ hello }\"}") - .accept(MediaType.APPLICATION_JSON), - ).andExpect(MockMvcResultMatchers.status().isOk) - .andExpect( - MockMvcResultMatchers - .content() - .contentType(MediaType.APPLICATION_JSON), - ) - } - } - - @Test - fun graphqlControllerMappedToCustomPath() { - context - .withConfiguration( - AutoConfigurations.of( - JacksonAutoConfiguration::class.java, - WebMvcAutoConfiguration::class.java, - DispatcherServletAutoConfiguration::class.java, - ), - ).withPropertyValues("dgs.graphql.path: /fooql") - .run { ctx -> - val mockMvc = MockMvcBuilders.webAppContextSetup(ctx).build() - mockMvc - .perform( - MockMvcRequestBuilders - .get("/fooql") - .contentType(MediaType.APPLICATION_JSON) - .content("{\"query\": \"{ hello }\"}") - .accept(MediaType.APPLICATION_JSON), - ).andExpect(MockMvcResultMatchers.status().isOk) - .andExpect( - MockMvcResultMatchers - .content() - .contentType(MediaType.APPLICATION_JSON), - ) - } - } - - @Test - fun schemaJsonControllerMappedToDefaultPath() { - context - .withConfiguration( - AutoConfigurations.of( - JacksonAutoConfiguration::class.java, - WebMvcAutoConfiguration::class.java, - DispatcherServletAutoConfiguration::class.java, - ), - ).run { ctx -> - val mockMvc = MockMvcBuilders.webAppContextSetup(ctx).build() - mockMvc - .perform( - MockMvcRequestBuilders - .get("/schema.json") - .accept(MediaType.APPLICATION_JSON), - ).andExpect(MockMvcResultMatchers.status().isOk) - .andExpect( - MockMvcResultMatchers - .content() - .contentType(MediaType.APPLICATION_JSON), - ) - } - } - - @Test - fun schemaJsonControllerMappedToCustomPath() { - context - .withConfiguration( - AutoConfigurations.of( - JacksonAutoConfiguration::class.java, - WebMvcAutoConfiguration::class.java, - DispatcherServletAutoConfiguration::class.java, - ), - ).withPropertyValues("dgs.graphql.schema-json.path: /foo.json") - .run { ctx -> - val mockMvc = MockMvcBuilders.webAppContextSetup(ctx).build() - mockMvc - .perform( - MockMvcRequestBuilders - .get("/foo.json") - .accept(MediaType.APPLICATION_JSON), - ).andExpect(MockMvcResultMatchers.status().isOk) - .andExpect( - MockMvcResultMatchers - .content() - .contentType(MediaType.APPLICATION_JSON), - ) - } - } - - @Configuration - open class MockUserConfiguration { - @Bean - open fun dgsSchemaProvider(): DgsSchemaProvider { - val objectType: GraphQLObjectType = - GraphQLObjectType - .newObject() - .name("helloType") - .field( - GraphQLFieldDefinition - .newFieldDefinition() - .name("hello") - .type(Scalars.GraphQLString), - ).build() - val schema = - GraphQLSchema - .newSchema() - .clearSchemaDirectives() - .clearAdditionalTypes() - .clearDirectives() - .query(objectType) - .build() - val mockSchemaProvider = mockk() - every { mockSchemaProvider.schema() } returns SchemaProviderResult(schema, RuntimeWiring.MOCKED_WIRING) - return mockSchemaProvider - } - - @Bean - open fun dgsQueryExecutor(): DgsQueryExecutor { - val mockExecutor = mockk() - every { - mockExecutor.execute( - "{ hello }", - any(), - any(), - any(), - null, - any(), - ) - } returns - ExecutionResultImpl - .newExecutionResult() - .data(mapOf(Pair("hi", "there"))) - .build() - return mockExecutor - } - - @Bean - @Qualifier("dgsObjectMapper") - open fun dgsObjectMapper(): ObjectMapper = jacksonObjectMapper().registerModule(jacksonJavaTimeModule) - - companion object { - val jacksonJavaTimeModule = JavaTimeModule() - } - } -} diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/DgsWebMvcConfigurationPropertiesTest.kt b/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/DgsWebMvcConfigurationPropertiesTest.kt deleted file mode 100644 index 12649783f..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/DgsWebMvcConfigurationPropertiesTest.kt +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webmvc.autoconfigure - -import org.assertj.core.api.Assertions.assertThat -import org.junit.jupiter.api.Test -import org.springframework.boot.context.properties.bind.Binder -import org.springframework.boot.context.properties.source.ConfigurationPropertySource -import org.springframework.boot.context.properties.source.MapConfigurationPropertySource -import java.util.* - -class DgsWebMvcConfigurationPropertiesTest { - @Test - fun graphQLPathDefault() { - val properties = bind(Collections.emptyMap()) - assertThat(properties.path).isEqualTo("/graphql") - } - - @Test - fun graphQLPathCustom() { - val properties = bind("dgs.graphql.path", "/private/gql") - assertThat(properties.path).isEqualTo("/private/gql") - } - - @Test - fun graphiQLPathDefault() { - val properties = bind(Collections.emptyMap()) - assertThat(properties.graphiql.path).isEqualTo("/graphiql") - } - - @Test - fun graphiQLPathCustom() { - val properties = bind("dgs.graphql.graphiql.path", "/private/giql") - assertThat(properties.graphiql.path).isEqualTo("/private/giql") - } - - @Test - fun graphiQLTitleDefault() { - val properties = bind("dgs.graphql.graphiql.title", "Simple GraphiQL Example") - assertThat(properties.graphiql.title).isEqualTo("Simple GraphiQL Example") - } - - @Test - fun graphiQLTitleCustom() { - val properties = bind("dgs.graphql.graphiql.title", "Custom GraphiQL Example") - assertThat(properties.graphiql.title).isEqualTo("Custom GraphiQL Example") - } - - @Test - fun schemaJsonPathDefault() { - val properties = bind(Collections.emptyMap()) - assertThat(properties.schemaJson.path).isEqualTo("/schema.json") - } - - @Test - fun schemaJsonPathCustom() { - val properties = bind("dgs.graphql.schema-json.path", "/private/schema.json") - assertThat(properties.schemaJson.path).isEqualTo("/private/schema.json") - } - - @Test - fun allCustomPathsSpecified() { - val propertyValues: MutableMap = HashMap() - propertyValues["dgs.graphql.path"] = "/private/gql" - propertyValues["dgs.graphql.graphiql.path"] = "/private/giql" - propertyValues["dgs.graphql.graphiql.title"] = "Simple GraphiQL Example" - propertyValues["dgs.graphql.schema-json.path"] = "/private/sj" - val properties = bind(propertyValues) - assertThat(properties.path).isEqualTo("/private/gql") - assertThat(properties.graphiql.path).isEqualTo("/private/giql") - assertThat(properties.graphiql.title).isEqualTo("Simple GraphiQL Example") - assertThat(properties.schemaJson.path).isEqualTo("/private/sj") - } - - private fun bind( - name: String, - value: String, - ): DgsWebMvcConfigurationProperties = bind(Collections.singletonMap(name, value)) - - private fun bind(map: Map): DgsWebMvcConfigurationProperties { - val source: ConfigurationPropertySource = MapConfigurationPropertySource(map) - return Binder(source).bindOrCreate("dgs.graphql", DgsWebMvcConfigurationProperties::class.java) - } -} diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/DgsWebMvcConfigurationPropertiesValidationTest.kt b/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/DgsWebMvcConfigurationPropertiesValidationTest.kt deleted file mode 100644 index c0faf04f6..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/DgsWebMvcConfigurationPropertiesValidationTest.kt +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webmvc.autoconfigure - -import org.assertj.core.api.Assertions.assertThat -import org.junit.jupiter.api.Test -import org.springframework.boot.autoconfigure.AutoConfigurations -import org.springframework.boot.context.properties.EnableConfigurationProperties -import org.springframework.boot.test.context.runner.ApplicationContextRunner -import org.springframework.context.annotation.Configuration - -class DgsWebMvcConfigurationPropertiesValidationTest { - private val context = - ApplicationContextRunner().withConfiguration( - AutoConfigurations.of( - MockConfigPropsAutoConfiguration::class.java, - ), - )!! - - @Test - fun graphqlControllerInvalidCustomPathEndsWithSlash() { - context - .withPropertyValues("dgs.graphql.path: /fooql/") - .run { ctx -> - assertThat( - ctx, - ).hasFailed().failure.rootCause().hasMessageContaining("dgs.graphql.path must start with '/' and not end with '/'") - } - } - - @Test - fun graphqlControllerInvalidCustomPathDoesNotStartWithSlash() { - context - .withPropertyValues("dgs.graphql.path: fooql") - .run { ctx -> - assertThat( - ctx, - ).hasFailed().failure.rootCause().hasMessageContaining("dgs.graphql.path must start with '/' and not end with '/'") - } - } - - @Test - fun graphqlControllerValidCustomPath() { - context - .withPropertyValues("dgs.graphql.path: /fooql") - .run { ctx -> - assertThat(ctx).hasNotFailed() - } - } - - @Test - fun graphiqlControllerInvalidCustomPathEndsWithSlash() { - context - .withPropertyValues("dgs.graphql.graphiql.path: /fooql/") - .run { ctx -> - assertThat( - ctx, - ).hasFailed().failure.rootCause().hasMessageContaining("dgs.graphql.graphiql.path must start with '/' and not end with '/'") - } - } - - @Test - fun graphiqlControllerInvalidCustomPathDoesNotStartWithSlash() { - context - .withPropertyValues("dgs.graphql.graphiql.path: fooql") - .run { ctx -> - assertThat( - ctx, - ).hasFailed().failure.rootCause().hasMessageContaining("dgs.graphql.graphiql.path must start with '/' and not end with '/'") - } - } - - @Test - fun graphiqlControllerValidCustomPath() { - context - .withPropertyValues("dgs.graphql.graphiql.path: /fooql") - .run { ctx -> - assertThat(ctx).hasNotFailed() - } - } - - @Test - fun schemaJsonControllerInvalidCustomPathEndsWithSlash() { - context - .withPropertyValues("dgs.graphql.schema-json.path: /fooql/") - .run { ctx -> - assertThat( - ctx, - ).hasFailed().failure.rootCause().hasMessageContaining( - "dgs.graphql.schema-json.path must start with '/' and not end with '/'", - ) - } - } - - @Test - fun schemaJsonControllerInvalidCustomPathDoesNotStartWithSlash() { - context - .withPropertyValues("dgs.graphql.schema-json.path: fooql") - .run { ctx -> - assertThat( - ctx, - ).hasFailed().failure.rootCause().hasMessageContaining( - "dgs.graphql.schema-json.path must start with '/' and not end with '/'", - ) - } - } - - @Test - fun schemaJsonControllerValidCustomPath() { - context - .withPropertyValues("dgs.graphql.schema-json.path: /fooql") - .run { ctx -> - assertThat(ctx).hasNotFailed() - } - } - - @Test - fun defaultsAreValid() { - context - .run { ctx -> - assertThat(ctx).hasNotFailed() - } - } - - @Configuration - @EnableConfigurationProperties(DgsWebMvcConfigurationProperties::class) - open class MockConfigPropsAutoConfiguration -} diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLPathConfigWithCustomGraphQLPathAndServletContextTest.kt b/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLPathConfigWithCustomGraphQLPathAndServletContextTest.kt deleted file mode 100644 index 39773f94b..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLPathConfigWithCustomGraphQLPathAndServletContextTest.kt +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webmvc.autoconfigure - -import org.assertj.core.api.Assertions.assertThat -import org.junit.jupiter.api.Assertions.assertTrue -import org.junit.jupiter.api.BeforeEach -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.boot.test.web.client.TestRestTemplate -import org.springframework.http.HttpStatus -import org.springframework.http.MediaType -import org.springframework.http.client.ClientHttpRequestInterceptor - -@SpringBootTest( - webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, - properties = ["dgs.graphql.path=/zuzu", "server.servlet.context-path=/foo"], -) -class GraphiQLPathConfigWithCustomGraphQLPathAndServletContextTest( - @Autowired private val testRestTemplate: TestRestTemplate, -) { - @BeforeEach - fun setRestTemplateHeaders() { - testRestTemplate.restTemplate.interceptors.add( - ClientHttpRequestInterceptor { request, body, execution -> - request.headers.contentType = MediaType.APPLICATION_JSON - return@ClientHttpRequestInterceptor execution.execute(request, body) - }, - ) - } - - @Test - fun customGraphQLPathAndCustomServletContext() { - /* - The graphiql endpoint returns the client side javascript and we don't actually execute it in order to verify - the validity of the "fetch" uri. In order to verify the "fetch" uri we have to prove some conditions - to ensure we are testing this properly. - - Fact1: The server has been configured w/ a context path ending w/ "/foo" - Fact2: The graphql controller is NOT available at "/graphql" - Fact3: The graphql controller IS available at "/foo/graphql" - Fact4: The graphiql javascript has its fetch replaced w/ "foo/graphql" - */ - - val rootUri = testRestTemplate.rootUri - // server has been configured with context path - assertThat(rootUri).endsWith("/foo") - - // graphql not available without context path in uri - val absPathWithoutContextPath = rootUri.substring(0, rootUri.length - "/foo".length) + "/zuzu" - var graphqlResponse = - testRestTemplate.getForEntity( - absPathWithoutContextPath, - String::class.java, - ) - assertThat(graphqlResponse.statusCode).isEqualTo(HttpStatus.NOT_FOUND) - - // graphql is available with context path in uri (400 expected as we don't sent proper request) - val absPathWithContextPath = "$rootUri/zuzu" - graphqlResponse = - testRestTemplate.getForEntity( - absPathWithContextPath, - String::class.java, - ) - assertThat(graphqlResponse.statusCode).isEqualTo(HttpStatus.BAD_REQUEST) - - val graphiqlResponse = - testRestTemplate.getForEntity( - "/graphiql", - String::class.java, - ) - assertTrue(graphiqlResponse.statusCode.is2xxSuccessful) - assertThat(graphiqlResponse.body).isNotNull.contains("fetch(origin + '/foo/zuzu'") - } -} diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLPathConfigWithCustomGraphQLPathTest.kt b/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLPathConfigWithCustomGraphQLPathTest.kt deleted file mode 100644 index c9cd0780b..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLPathConfigWithCustomGraphQLPathTest.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webmvc.autoconfigure - -import org.assertj.core.api.Assertions -import org.junit.jupiter.api.Assertions.assertTrue -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.boot.test.web.client.TestRestTemplate - -@SpringBootTest( - webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, - properties = ["dgs.graphql.path=/zuzu"], -) -class GraphiQLPathConfigWithCustomGraphQLPathTest( - @Autowired val restTemplate: TestRestTemplate, -) { - @Test - fun customGraphQLPath() { - val entity = - restTemplate.getForEntity( - "/graphiql", - String::class.java, - ) - assertTrue(entity.statusCode.is2xxSuccessful) - Assertions.assertThat(entity.body).isNotNull.contains("fetch(origin + '/zuzu'") - } -} diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLPathConfigWithCustomGraphiQLPathTest.kt b/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLPathConfigWithCustomGraphiQLPathTest.kt deleted file mode 100644 index 4db32fd38..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLPathConfigWithCustomGraphiQLPathTest.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webmvc.autoconfigure - -import org.assertj.core.api.Assertions -import org.junit.jupiter.api.Assertions.assertTrue -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.boot.test.web.client.TestRestTemplate - -@SpringBootTest( - webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, - properties = ["dgs.graphql.graphiql.path=/magic/things"], -) -class GraphiQLPathConfigWithCustomGraphiQLPathTest( - @Autowired val restTemplate: TestRestTemplate, -) { - @Test - fun customGraphiQLPath() { - val entity = - restTemplate.getForEntity( - "/magic/things", - String::class.java, - ) - assertTrue(entity.statusCode.is2xxSuccessful) - Assertions.assertThat(entity.body).isNotNull.contains("fetch(origin + '/graphql'") - } -} diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLPathConfigWithCustomPathsTest.kt b/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLPathConfigWithCustomPathsTest.kt deleted file mode 100644 index 9446edf7d..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLPathConfigWithCustomPathsTest.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webmvc.autoconfigure - -import org.assertj.core.api.Assertions -import org.junit.jupiter.api.Assertions.assertTrue -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.boot.test.web.client.TestRestTemplate - -@SpringBootTest( - webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, - properties = ["dgs.graphql.path=/zuzu", "dgs.graphql.graphiql.path=/magic/things"], -) -class GraphiQLPathConfigWithCustomPathsTest( - @Autowired val restTemplate: TestRestTemplate, -) { - @Test - fun customGraphiQLPath() { - val entity = - restTemplate.getForEntity( - "/magic/things", - String::class.java, - ) - assertTrue(entity.statusCode.is2xxSuccessful) - Assertions.assertThat(entity.body).isNotNull.contains("fetch(origin + '/zuzu'") - } -} diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLPathConfigWithDefaultPathsTest.kt b/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLPathConfigWithDefaultPathsTest.kt deleted file mode 100644 index 7b91a8047..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLPathConfigWithDefaultPathsTest.kt +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webmvc.autoconfigure - -import org.assertj.core.api.Assertions -import org.junit.jupiter.api.Assertions.assertTrue -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.boot.test.web.client.TestRestTemplate - -@SpringBootTest( - webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, -) -class GraphiQLPathConfigWithDefaultPathsTest( - @Autowired val restTemplate: TestRestTemplate, -) { - @Test - fun defaultPaths() { - val entity = - restTemplate.getForEntity( - "/graphiql", - String::class.java, - ) - assertTrue(entity.statusCode.is2xxSuccessful) - Assertions.assertThat(entity.body).isNotNull.contains("fetch(origin + '/graphql'") - } -} diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLTitleConfigWithCustomGraphiQLTitleTest.kt b/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLTitleConfigWithCustomGraphiQLTitleTest.kt deleted file mode 100644 index 47030a9fd..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLTitleConfigWithCustomGraphiQLTitleTest.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webmvc.autoconfigure - -import org.assertj.core.api.Assertions -import org.junit.jupiter.api.Assertions.assertTrue -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.boot.test.web.client.TestRestTemplate - -@SpringBootTest( - webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, - properties = ["dgs.graphql.graphiql.title=Custom GraphiQL Title"], -) -class GraphiQLTitleConfigWithCustomGraphiQLTitleTest( - @Autowired val restTemplate: TestRestTemplate, -) { - @Test - fun customGraphiQLTitle() { - val entity = - restTemplate.getForEntity( - "/graphiql", - String::class.java, - ) - assertTrue(entity.statusCode.is2xxSuccessful) - Assertions.assertThat(entity.body).isNotNull.contains("Custom GraphiQL Title") - } -} diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLTitleConfigWithDefaultGraphiQLTitleTest.kt b/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLTitleConfigWithDefaultGraphiQLTitleTest.kt deleted file mode 100644 index 4c698969f..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/GraphiQLTitleConfigWithDefaultGraphiQLTitleTest.kt +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webmvc.autoconfigure - -import org.assertj.core.api.Assertions -import org.junit.jupiter.api.Assertions.assertTrue -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.boot.test.web.client.TestRestTemplate - -@SpringBootTest( - webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, -) -class GraphiQLTitleConfigWithDefaultGraphiQLTitleTest( - @Autowired val restTemplate: TestRestTemplate, -) { - @Test - fun defaultGraphiQLTitle() { - val entity = - restTemplate.getForEntity( - "/graphiql", - String::class.java, - ) - assertTrue(entity.statusCode.is2xxSuccessful) - Assertions.assertThat(entity.body).isNotNull.contains("Simple GraphiQL Example") - } -} diff --git a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/WebRequestTest.kt b/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/WebRequestTest.kt deleted file mode 100644 index 38d48f251..000000000 --- a/graphql-dgs-spring-webmvc-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/webmvc/autoconfigure/WebRequestTest.kt +++ /dev/null @@ -1,550 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.webmvc.autoconfigure - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsData -import com.netflix.graphql.dgs.DgsDataFetchingEnvironment -import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry -import com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration -import com.netflix.graphql.dgs.context.DgsContext -import com.netflix.graphql.dgs.context.DgsCustomContextBuilderWithRequest -import com.netflix.graphql.dgs.internal.DgsWebMvcRequestData -import graphql.language.FieldDefinition -import graphql.language.ObjectTypeDefinition -import graphql.language.TypeName -import graphql.schema.idl.TypeDefinitionRegistry -import jakarta.servlet.http.Cookie -import org.hamcrest.CoreMatchers.containsString -import org.hamcrest.CoreMatchers.equalTo -import org.hamcrest.CoreMatchers.hasItem -import org.junit.jupiter.api.Test -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.http.HttpHeaders -import org.springframework.http.MediaType -import org.springframework.stereotype.Component -import org.springframework.test.web.servlet.MockMvc -import org.springframework.test.web.servlet.request.MockMvcRequestBuilders -import org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath -import org.springframework.test.web.servlet.result.MockMvcResultMatchers.status -import org.springframework.web.bind.annotation.CookieValue -import org.springframework.web.bind.annotation.RequestHeader -import org.springframework.web.bind.annotation.RequestParam -import org.springframework.web.context.request.ServletWebRequest -import org.springframework.web.context.request.WebRequest -import org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration -import java.util.* - -@SpringBootTest( - classes = [ - DgsWebMvcAutoConfiguration::class, - DgsAutoConfiguration::class, - DelegatingWebMvcConfiguration::class, - WebRequestTest.ExampleImplementation::class, - WebRequestTest.TestCustomContextBuilder::class, - ], - webEnvironment = SpringBootTest.WebEnvironment.MOCK, -) -@AutoConfigureMockMvc -class WebRequestTest { - @Autowired - lateinit var mockMvc: MockMvc - - @Test - fun `WebRequest should be available on DgsContext`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ usingWebRequest }" }"""), - ).andExpect(status().isOk) - .andExpect(jsonPath("$.data.usingWebRequest").value("localhost")) - } - - @Test - fun `@RequestHeader should be available`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ usingHeader }" }""") - .header("myheader", "hello"), - ).andExpect(status().isOk) - .andExpect(jsonPath("$.data.usingHeader").value("hello")) - } - - @Test - fun `@RequestHeader should support defaultValue`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ usingHeader }" }"""), - ).andExpect(status().isOk) - .andExpect(jsonPath("$.data.usingHeader").value("default header")) - } - - @Test - fun `@RequestHeader should throw an exception when not provided but required and no default is set`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ usingRequiredHeader }" }"""), - ).andExpect(status().isOk) - .andExpect( - jsonPath("$.errors[*].message") - .value(hasItem(containsString("Required request header 'myheader' for method parameter type String is not present"))), - ) - } - - @Test - fun `@RequestHeader should use null if not required and not provided`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ usingOptionalHeader }" }"""), - ).andExpect(status().isOk) - .andExpect(jsonPath("$.data.usingOptionalHeader").value(equalTo("default header from datafetcher"))) - } - - @Test - fun `@RequestHeader should support Optional for not provided values`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ usingOptionalHeaderAsOptionalType }" }"""), - ).andExpect(status().isOk) - .andExpect( - jsonPath("$.data.usingOptionalHeaderAsOptionalType") - .value("default header from Optional"), - ) - } - - @Test - fun `@RequestHeader should support Optional for provided values`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ usingOptionalHeaderAsOptionalType }" }""") - .header("myheader", "hello"), - ).andExpect(status().isOk) - .andExpect(jsonPath("$.data.usingOptionalHeaderAsOptionalType").value("hello")) - } - - @Test - fun `@RequestParam should be available`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ usingParam }" }""") - .param("myParam", "paramValue"), - ).andExpect(status().isOk) - .andExpect(jsonPath("$.data.usingParam").value("paramValue")) - } - - @Test - fun `@RequestParam should properly handle multiple param values`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ usingParam }" }""") - .param("myParam", "paramValue") - .param("myParam", "paramValue2"), - ).andExpect(status().isOk) - .andExpect(jsonPath("$.data.usingParam").value("paramValue,paramValue2")) - } - - @Test - fun `@RequestParam should use default when no parameter was provided`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ usingParam }" }"""), - ).andExpect(status().isOk) - .andExpect(jsonPath("$.data.usingParam").value("default parameter")) - } - - @Test - fun `@RequestParam should throw exception when no parameter was provided and no default is set`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ usingParamRequired }" }"""), - ).andExpect(status().isOk) - .andExpect( - jsonPath("$.errors[*].message") - .value(hasItem(containsString("Required request parameter 'myParam' for method parameter type String is not present"))), - ) - } - - @Test - fun `@RequestParam should use null when not required and not provided`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ usingOptionalParam }" }"""), - ).andExpect(status().isOk) - .andExpect(jsonPath("$.data.usingOptionalParam").value("default from datafetcher")) - } - - @Test - fun `@RequestParam should support Optional parameters with non required null values`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ usingOptionalParamAsOptionalType }" }"""), - ).andExpect(status().isOk) - .andExpect( - jsonPath("$.data.usingOptionalParamAsOptionalType") - .value("default param from Optional"), - ) - } - - @Test - fun `@RequestParam should support Optional parameters`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ usingOptionalParamAsOptionalType }" }""") - .param("myParam", "hello"), - ).andExpect(status().isOk) - .andExpect(jsonPath("$.data.usingOptionalParamAsOptionalType").value("hello")) - } - - @Test - fun `Custom context builder should have access to headers`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ usingContextWithRequest }" }""") - .header("myheader", "hello"), - ).andExpect(status().isOk) - .andExpect(jsonPath("$.data.usingContextWithRequest").value("hello")) - } - - @Test - fun `@CookieValue should give access to cookie`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ withCookie }" }""") - .cookie(Cookie("myCookie", "cookiehello")), - ).andExpect(status().isOk) - .andExpect(jsonPath("$.data.withCookie").value("cookiehello")) - } - - @Test - fun `@CookieValue should allow Optional type`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ withOptionalCookie }" }""") - .cookie(Cookie("myCookie", "cookiehello")), - ).andExpect(status().isOk) - .andExpect(jsonPath("$.data.withOptionalCookie").value("cookiehello")) - } - - @Test - fun `@CookieValue should allow empty Optional type`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ withEmptyOptionalCookie }" }"""), - ).andExpect(status().isOk) - .andExpect(jsonPath("$.data.withEmptyOptionalCookie").value("emptycookie")) - } - - @Test - fun `@CookieValue should allow null when not required`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ withEmptyCookie }" }"""), - ).andExpect(status().isOk) - .andExpect(jsonPath("$.data.withEmptyCookie").value("emptycookie")) - } - - @Test - fun `@CookieValue should throw exception when required but not set`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ withRequiredCookie }" }"""), - ).andExpect(status().isOk) - .andExpect( - jsonPath("$.errors[*].message") - .value(hasItem(containsString("Required cookie 'myCookie' for method parameter type String is not present"))), - ) - } - - @Test - fun `@CookieValue should support default value`() { - mockMvc - .perform( - MockMvcRequestBuilders - .post("/graphql") - .contentType(MediaType.APPLICATION_JSON) - .content("""{"query": "{ withDefaultCookie }" }"""), - ).andExpect(status().isOk) - .andExpect(jsonPath("$.data.withDefaultCookie").value("defaultvalue")) - } - - @DgsComponent - class ExampleImplementation { - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry { - val newRegistry = TypeDefinitionRegistry() - - val query = - ObjectTypeDefinition - .newObjectTypeDefinition() - .name("Query") - .fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("usingWebRequest") - .type(TypeName("String")) - .build(), - ).fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("usingHeader") - .type(TypeName("String")) - .build(), - ).fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("usingRequiredHeader") - .type(TypeName("String")) - .build(), - ).fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("usingOptionalHeader") - .type(TypeName("String")) - .build(), - ).fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("usingOptionalHeaderAsOptionalType") - .type(TypeName("String")) - .build(), - ).fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("usingContextWithRequest") - .type(TypeName("String")) - .build(), - ).fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("usingParam") - .type(TypeName("String")) - .build(), - ).fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("usingParamRequired") - .type(TypeName("String")) - .build(), - ).fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("usingOptionalParam") - .type(TypeName("String")) - .build(), - ).fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("usingOptionalParamAsOptionalType") - .type(TypeName("String")) - .build(), - ).fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("withCookie") - .type(TypeName("String")) - .build(), - ).fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("withOptionalCookie") - .type(TypeName("String")) - .build(), - ).fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("withEmptyOptionalCookie") - .type(TypeName("String")) - .build(), - ).fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("withEmptyCookie") - .type(TypeName("String")) - .build(), - ).fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("withRequiredCookie") - .type(TypeName("String")) - .build(), - ).fieldDefinition( - FieldDefinition - .newFieldDefinition() - .name("withDefaultCookie") - .type(TypeName("String")) - .build(), - ).build() - newRegistry.add(query) - - return newRegistry - } - - @DgsData(parentType = "Query", field = "usingWebRequest") - fun usingWebRequest(dfe: DgsDataFetchingEnvironment): String = - ((DgsContext.getRequestData(dfe) as DgsWebMvcRequestData).webRequest as ServletWebRequest).request.serverName - - @DgsData(parentType = "Query", field = "usingHeader") - fun usingRequestHeader( - @RequestHeader(defaultValue = "default header") myheader: String?, - ): String = myheader ?: "empty" - - @DgsData(parentType = "Query", field = "usingRequiredHeader") - fun usingRequiredRequestHeader( - @RequestHeader(required = true) myheader: String, - ): String = myheader - - @DgsData(parentType = "Query", field = "usingOptionalHeader") - fun usingOptionalRequestHeader( - @RequestHeader(required = false) myheader: String?, - ): String = myheader ?: "default header from datafetcher" - - @DgsData(parentType = "Query", field = "usingOptionalHeaderAsOptionalType") - fun usingOptionalRequestHeader( - @RequestHeader(required = false) myheader: Optional, - ): String = myheader.orElse("default header from Optional") - - @DgsData(parentType = "Query", field = "usingContextWithRequest") - fun usingContextWithRequest(dataFetchingEnvironment: DgsDataFetchingEnvironment): String { - val customContext: TestContext = DgsContext.getCustomContext(dataFetchingEnvironment) - return customContext.myheader - } - - @DgsData(parentType = "Query", field = "usingParam") - fun usingRequestParam( - @RequestParam(defaultValue = "default parameter") myParam: String, - ): String = myParam - - @DgsData(parentType = "Query", field = "usingParamRequired") - fun usingRequestParamRequired( - @RequestParam(required = true) myParam: String, - ): String = myParam - - @DgsData(parentType = "Query", field = "usingOptionalParam") - fun usingOptionalRequestParam( - @RequestParam(required = false) myParam: String?, - ): String = myParam ?: "default from datafetcher" - - @DgsData(parentType = "Query", field = "usingOptionalParamAsOptionalType") - fun usingOptionalParamAsOptionalType( - @RequestParam(required = false) myParam: Optional, - ): String = myParam.orElse("default param from Optional") - - @DgsData(parentType = "Query", field = "withCookie") - fun usingCookie( - @CookieValue myCookie: String, - ): String = myCookie - - @DgsData(parentType = "Query", field = "withOptionalCookie") - fun usingOptionalCookie( - @CookieValue myCookie: Optional, - ): String = myCookie.get() - - @DgsData(parentType = "Query", field = "withEmptyOptionalCookie") - fun usingEmptyOptionalCookie( - @CookieValue(required = false) myCookie: Optional, - ): String = myCookie.orElse("emptycookie") - - @DgsData(parentType = "Query", field = "withEmptyCookie") - fun usingEmptyOptionalCookie( - @CookieValue(required = false) myCookie: String?, - ): String = myCookie ?: "emptycookie" - - @DgsData(parentType = "Query", field = "withRequiredCookie") - fun usingRequiredCookie( - @CookieValue(required = true) myCookie: String, - ): String = myCookie - - @DgsData(parentType = "Query", field = "withDefaultCookie") - fun usingCookieWithDefault( - @CookieValue(defaultValue = "defaultvalue") myCookie: String, - ): String = myCookie - } - - @Component - class TestCustomContextBuilder : DgsCustomContextBuilderWithRequest { - override fun build( - extensions: Map?, - headers: HttpHeaders?, - webRequest: WebRequest?, - ): TestContext = TestContext(headers?.getFirst("myheader") ?: "not set") - } - - data class TestContext( - val myheader: String, - ) -} diff --git a/graphql-dgs-spring-webmvc/build.gradle.kts b/graphql-dgs-spring-webmvc/build.gradle.kts deleted file mode 100644 index ffedfe784..000000000 --- a/graphql-dgs-spring-webmvc/build.gradle.kts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -dependencies { - api(project(":graphql-error-types")) - api(project(":graphql-dgs")) - - implementation(kotlin("reflect")) - implementation("com.fasterxml.jackson.module:jackson-module-kotlin") - implementation("org.springframework:spring-web") - compileOnly("jakarta.servlet:jakarta.servlet-api") - - testImplementation("org.springframework:spring-webmvc") - testImplementation("org.springframework:spring-test") - testImplementation("org.springframework.boot:spring-boot-starter-test") - testImplementation("jakarta.servlet:jakarta.servlet-api") -} diff --git a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/DefaultDgsGraphQLRequestHeaderValidator.kt b/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/DefaultDgsGraphQLRequestHeaderValidator.kt deleted file mode 100644 index 6d1dacd34..000000000 --- a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/DefaultDgsGraphQLRequestHeaderValidator.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.mvc - -import org.springframework.http.HttpHeaders - -class DefaultDgsGraphQLRequestHeaderValidator( - private val contentTypePredicates: List = - listOf(GraphQLRequestContentTypePredicate.STRICT_GRAPHQL_CONTENT_TYPES_PREDICATE), - private val validationRules: List = - DgsGraphQLRequestHeaderValidator.RECOMMENDED_GRAPHQL_REQUEST_HEADERS_VALIDATOR, -) : DgsGraphQLRequestHeaderValidator { - override fun assert(headers: HttpHeaders) { - if (contentTypePredicates.isNotEmpty()) { - contentTypePredicates.find { it.accept(headers.contentType) } - ?: throw DgsGraphQLRequestHeaderValidator - .GraphqlRequestContentTypePredicateException("Unsupported Content-Type ${headers.contentType}") - } - validationRules.forEach { it.assert(headers) } - } -} diff --git a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/DgsGraphQLCSRFInstrumentation.kt b/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/DgsGraphQLCSRFInstrumentation.kt deleted file mode 100644 index 5fa3c0d7e..000000000 --- a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/DgsGraphQLCSRFInstrumentation.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.netflix.graphql.dgs.mvc - -import com.netflix.graphql.dgs.context.DgsContext -import com.netflix.graphql.dgs.internal.DgsWebMvcRequestData -import graphql.ExecutionResult -import graphql.execution.instrumentation.InstrumentationContext -import graphql.execution.instrumentation.InstrumentationState -import graphql.execution.instrumentation.SimplePerformantInstrumentation -import graphql.execution.instrumentation.parameters.InstrumentationExecuteOperationParameters -import graphql.language.OperationDefinition -import org.springframework.http.HttpMethod -import org.springframework.http.HttpStatus -import org.springframework.web.context.request.ServletWebRequest -import org.springframework.web.server.ResponseStatusException - -class DgsGraphQLCSRFInstrumentation : SimplePerformantInstrumentation() { - override fun beginExecuteOperation( - parameters: InstrumentationExecuteOperationParameters, - state: InstrumentationState?, - ): InstrumentationContext? { - if (parameters.executionContext.operationDefinition.operation == OperationDefinition.Operation.MUTATION) { - val httpRequest = (DgsContext.from(parameters.executionContext.graphQLContext).requestData as DgsWebMvcRequestData).webRequest - if (httpRequest is ServletWebRequest) { - if (httpRequest.httpMethod == HttpMethod.GET) { - throw ResponseStatusException(HttpStatus.BAD_REQUEST, "Bad Request") - } - } - } - return super.beginExecuteOperation(parameters, state) - } -} diff --git a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/DgsGraphQLRequestHeaderValidator.kt b/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/DgsGraphQLRequestHeaderValidator.kt deleted file mode 100644 index c4ec356ac..000000000 --- a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/DgsGraphQLRequestHeaderValidator.kt +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.mvc - -import org.springframework.http.HttpHeaders - -fun interface DgsGraphQLRequestHeaderValidator { - companion object { - /** Recommended GraphQL request header validator. **/ - val RECOMMENDED_GRAPHQL_REQUEST_HEADERS_VALIDATOR = listOf(GraphQLCSRFRequestHeaderValidationRule()) - } - - @kotlin.jvm.Throws(GraphqlRequestHeaderValidationException::class) - fun assert(headers: HttpHeaders) - - open class GraphqlRequestHeaderValidationException( - s: String, - ) : IllegalArgumentException(s) - - open class GraphqlRequestContentTypePredicateException( - s: String, - ) : GraphqlRequestHeaderValidationException(s) - - open class GraphQLRequestHeaderRuleException( - s: String, - ) : GraphqlRequestHeaderValidationException(s) -} diff --git a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/DgsRestController.kt b/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/DgsRestController.kt deleted file mode 100644 index 2943a037a..000000000 --- a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/DgsRestController.kt +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.mvc - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties -import com.fasterxml.jackson.core.JsonParseException -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.databind.exc.MismatchedInputException -import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper -import com.fasterxml.jackson.module.kotlin.readValue -import com.netflix.graphql.dgs.DgsExecutionResult -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.dgs.internal.utils.MultipartVariableMapper -import com.netflix.graphql.dgs.internal.utils.VariableMappingException -import graphql.execution.reactive.SubscriptionPublisher -import org.intellij.lang.annotations.Language -import org.slf4j.Logger -import org.slf4j.LoggerFactory -import org.springframework.http.HttpHeaders -import org.springframework.http.HttpStatus -import org.springframework.http.MediaType -import org.springframework.http.ResponseEntity -import org.springframework.web.bind.annotation.RequestHeader -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RequestParam -import org.springframework.web.bind.annotation.RestController -import org.springframework.web.context.request.WebRequest -import org.springframework.web.multipart.MultipartFile -import java.io.InputStream -import kotlin.time.measureTimedValue - -/** - * HTTP entrypoint for the framework. Functionality in this class should be limited, so that as much code as possible - * is reused between different transport protocols and the testing framework. - * - * In addition to regular graphql queries, this method also handles multipart POST requests containing files for upload. - * This is usually a POST request that has Content type set to multipart/form-data. Here is an example command. - * - * Each part in a multipart request is identified by the -F and is identified by the part name - "operations, map etc." - * The "operations" part is the graphql query containing the mutation for the file upload, with variables for files set to null. - * The "map" part and the subsequent parts specify the path of the file in the variables of the query, and will get mapped to - * construct the graphql query that looks like this: - * - * {"query": "mutation ($input: FileUploadInput!) { uploadFile(input: $input) }", - * "variables": { "input": { "description": "test", "files": [file1.txt, file2.txt] } } - * - * where files map to one or more MultipartFile(s) - * - * The remaining parts in the request contain the mapping of file name to file path, i.e. a map of MultipartFile(s) - * The format of a multipart request is also described here: - * https://github.com/jaydenseric/graphql-multipart-request-spec - * - * This class is defined as "open" only for proxy/aop use cases. It is not considered part of the API, and backwards compatibility is not guaranteed. - * Do not manually extend this class. - */ - -@RestController -open class DgsRestController( - open val dgsQueryExecutor: DgsQueryExecutor, - open val mapper: ObjectMapper = jacksonObjectMapper(), - open val dgsGraphQLRequestHeaderValidator: DgsGraphQLRequestHeaderValidator = DefaultDgsGraphQLRequestHeaderValidator(), -) { - companion object { - // defined in here and DgsExecutionResult, for backwards compatibility. - // keep these two variables synced. - const val DGS_RESPONSE_HEADERS_KEY = DgsExecutionResult.DGS_RESPONSE_HEADERS_KEY - private val logger: Logger = LoggerFactory.getLogger(DgsRestController::class.java) - - @JsonIgnoreProperties(ignoreUnknown = true) - private data class InputQuery( - @Language("graphql") val query: String?, - val operationName: String? = null, - val variables: Map? = mapOf(), - val extensions: Map? = mapOf(), - ) - } - - // The @ConfigurationProperties bean name is - - // TODO Allow users to disable multipart-form/data - @RequestMapping( - "#{ environment['dgs.graphql.path'] ?: '/graphql' }", - consumes = [MediaType.APPLICATION_JSON_VALUE, GraphQLMediaTypes.GRAPHQL_MEDIA_TYPE_VALUE], - produces = [MediaType.APPLICATION_JSON_VALUE], - ) - fun graphql( - body: InputStream, - @RequestHeader headers: HttpHeaders, - webRequest: WebRequest, - ): ResponseEntity { - val result = errorResponseForInvalid(headers) - if (result != null) { - return result - } - - logger.debug("Starting HTTP GraphQL handling...") - - val inputQuery: InputQuery - - if (GraphQLMediaTypes.includesApplicationGraphQL(headers)) { - inputQuery = InputQuery(query = body.bufferedReader().readText()) - } else { - try { - inputQuery = mapper.readValue(body) - } catch (ex: Exception) { - return when (ex) { - is JsonParseException -> - ResponseEntity - .badRequest() - .body("Invalid query - ${ex.message ?: "no details found in the error message"}.") - is MismatchedInputException -> - ResponseEntity - .badRequest() - .body("Invalid query - No content to map to input.") - - else -> - ResponseEntity - .badRequest() - .body("Invalid query - ${ex.message ?: "no additional details found"}.") - } - } - } - - return executeQuery(inputQuery = inputQuery, headers = headers, webRequest = webRequest) - } - - @RequestMapping( - "#{ environment['dgs.graphql.path'] ?: '/graphql' }", - consumes = [MediaType.MULTIPART_FORM_DATA_VALUE], - produces = [MediaType.APPLICATION_JSON_VALUE], - ) - fun graphQlMultipart( - @RequestParam fileParams: Map, - @RequestParam(name = "operations") operation: String, - @RequestParam(name = "map") mapParam: String, - @RequestHeader headers: HttpHeaders, - webRequest: WebRequest, - ): ResponseEntity { - val result = errorResponseForInvalid(headers) - if (result != null) { - return result - } - - val inputQuery: InputQuery = mapper.readValue(operation) - - // parse the '-F map' of MultipartFile(s) containing object paths - val variables = - inputQuery.variables?.toMutableMap() - ?: return ResponseEntity.badRequest().body("No variables specified as part of multipart request") - val fileMapInput: Map> = mapper.readValue(mapParam) - try { - fileMapInput.forEach { (fileKey, objectPaths) -> - val file = fileParams[fileKey] - if (file != null) { - // the variable mapper takes each multipart file and replaces the null portion of the query variables with the file - objectPaths.forEach { objectPath -> - MultipartVariableMapper.mapVariable( - objectPath, - variables, - file, - ) - } - } - } - } catch (exc: VariableMappingException) { - return ResponseEntity - .badRequest() - .body("Failed mapping file upload to variable: ${exc.message}") - } - - return executeQuery( - inputQuery = inputQuery.copy(variables = variables), - headers = headers, - webRequest = webRequest, - ) - } - - private fun errorResponseForInvalid(headers: HttpHeaders): ResponseEntity? { - logger.debug("Validate HTTP Headers for the GraphQL endpoint...") - try { - dgsGraphQLRequestHeaderValidator.assert(headers) - } catch (e: DgsGraphQLRequestHeaderValidator.GraphqlRequestContentTypePredicateException) { - logger.debug("Unsupported Media-Type {}.", headers.contentType, e) - return ResponseEntity - .status(HttpStatus.UNSUPPORTED_MEDIA_TYPE) - .body("Unsupported media type.") - } catch (e: DgsGraphQLRequestHeaderValidator.GraphQLRequestHeaderRuleException) { - logger.debug("The Request Headers failed a DGS Header validation rule.", e) - return ResponseEntity.badRequest().body(e.message) - } catch (e: DgsGraphQLRequestHeaderValidator.GraphqlRequestHeaderValidationException) { - logger.debug("The DGS Request Header Validator deemed the request headers as invalid.", e) - return ResponseEntity.badRequest().body(e.message) - } catch (e: Exception) { - logger.error("The DGS Request Header Validator failed with exception!", e) - return ResponseEntity.internalServerError().body("Unable to validate the HTTP Request Headers.") - } - return null - } - - private fun executeQuery( - inputQuery: InputQuery, - headers: HttpHeaders, - webRequest: WebRequest, - ): ResponseEntity { - val (executionResult, elapsed) = - measureTimedValue { - dgsQueryExecutor.execute( - inputQuery.query, - inputQuery.variables.orEmpty(), - inputQuery.extensions, - headers, - inputQuery.operationName, - webRequest, - ) - } - logger.debug("Executed query in {}ms", elapsed.inWholeMilliseconds) - logger.debug( - "Execution result - Contains data: '{}' - Number of errors: {}", - executionResult.isDataPresent, - executionResult.errors.size, - ) - - if (executionResult.isDataPresent && executionResult.getData() is SubscriptionPublisher) { - return ResponseEntity - .badRequest() - .body("Trying to execute subscription on /graphql. Use /subscriptions instead!") - } - - return when (executionResult) { - is DgsExecutionResult -> executionResult.toSpringResponse() - else -> - DgsExecutionResult - .builder() - .executionResult(executionResult) - .build() - .toSpringResponse() - } - } -} diff --git a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/DgsRestSchemaJsonController.kt b/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/DgsRestSchemaJsonController.kt deleted file mode 100644 index 385fac276..000000000 --- a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/DgsRestSchemaJsonController.kt +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.mvc - -import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper -import com.netflix.graphql.dgs.internal.DgsSchemaProvider -import graphql.ExecutionInput -import graphql.ExecutionResult -import graphql.GraphQL -import graphql.introspection.IntrospectionQuery -import graphql.schema.GraphQLSchema -import org.springframework.http.MediaType -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController - -/** - * Provides an HTTP endpoint to retrieve the available schema. - * - * This class is defined as "open" only for proxy/aop use cases. It is not considered part of the API, and backwards compatibility is not guaranteed. - * Do not manually extend this class. - */ -@RestController -open class DgsRestSchemaJsonController( - open val schemaProvider: DgsSchemaProvider, -) { - // The @ConfigurationProperties bean name is - - @RequestMapping( - "#{@'dgs.graphql-com.netflix.graphql.dgs.webmvc.autoconfigure.DgsWebMvcConfigurationProperties'.schemaJson.path}", - produces = [ MediaType.APPLICATION_JSON_VALUE ], - ) - fun schema(): String { - val graphQLSchema: GraphQLSchema = schemaProvider.schema().graphQLSchema - val graphQL = GraphQL.newGraphQL(graphQLSchema).build() - - val executionInput: ExecutionInput = - ExecutionInput - .newExecutionInput() - .query(IntrospectionQuery.INTROSPECTION_QUERY) - .build() - val execute: ExecutionResult = graphQL.execute(executionInput) - - return mapper.writeValueAsString(execute.toSpecification()) - } - - companion object { - private val mapper = jacksonObjectMapper() - } -} diff --git a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/GraphQLCSRFRequestHeaderValidationRule.kt b/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/GraphQLCSRFRequestHeaderValidationRule.kt deleted file mode 100644 index 32872e39c..000000000 --- a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/GraphQLCSRFRequestHeaderValidationRule.kt +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.mvc - -import org.springframework.http.HttpHeaders -import org.springframework.http.MediaType -import org.springframework.util.StringUtils - -/** - * Implementation of a [GraphQLRequestHeaderValidationRule] that will make sure that the HTTP Request - * Has either a content-type that enforces a _pre-flight_ check or has a preflight header, defined below. - * A content-type that enforces a _pre-flight_ check shouldn't be any of the content-types defined in [NON_PREFLIGHTED_CONTENT_TYPES]. - * Which are the _pre-flight_ headers we support? See [GRAPHQL_PREFLIGHT_REQUESTS_HEADERS] - * - * What is a _pre-flight_ check? - * It is a check that a common browser will do to enforce a [CORS policy](https://github.com/apollographql/apollo-server/security/advisories/GHSA-2p3c-p3qw-69r4). - * - * **Note**, is the responsibility of the applications to define a sensible CORS policy that will prevent a CSRF attack. - */ -class GraphQLCSRFRequestHeaderValidationRule : GraphQLRequestHeaderValidationRule { - companion object { - // CSRF Prevention Request Headers - @Suppress("MemberVisibilityCanBePrivate") - const val HEADER_X_APOLLO_OPERATION_NAME = "x-apollo-operation-name" - - @Suppress("MemberVisibilityCanBePrivate") - const val HEADER_APOLLO_REQUIRE_PREFLIGHT = "apollo-require-preflight" - - @Suppress("MemberVisibilityCanBePrivate") - const val HEADER_GRAPHQL_REQUIRE_PREFLIGHT = "graphql-require-preflight" - - /** - * Headers, defined as `content-type`, that will not enforce a _preflight_ check by browsers. - * In other words, if the `content-type` of the request matches any of these the browser will not enforce a CORS - * check. - * - * See [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS). - */ - val NON_PREFLIGHTED_CONTENT_TYPES = - setOf( - MediaType.APPLICATION_FORM_URLENCODED, - MediaType.MULTIPART_FORM_DATA, - MediaType.TEXT_PLAIN, - ) - - /** - * Headers that should be available in case the request has either no `content-type` or one - * that matches any of the [NON_PREFLIGHTED_CONTENT_TYPES]. - * Clients, which is the case with Apollo Client for example, *should always* define a `content-type` even - * if they are doing a `GET` request. - * - * Apollo Client Web, Apollo iOS, and Apollo Kotlin always send `x-apollo-operation-name` for example. - * - * See [](https://github.com/apollographql/apollo-server/blob/version-4/packages/server/src/preventCsrf.ts) - */ - val GRAPHQL_PREFLIGHT_REQUESTS_HEADERS = - listOf( - HEADER_APOLLO_REQUIRE_PREFLIGHT, - HEADER_X_APOLLO_OPERATION_NAME, - HEADER_GRAPHQL_REQUIRE_PREFLIGHT, - ).map { it.lowercase() }.toSet() - - /** - * > We don't want random websites to be able to execute actual GraphQL operations - * > from a user's browser unless our CORS policy supports it. It's not good - * > enough just to ensure that the browser can't read the response from the - * > operation; we also want to prevent CSRF, where the attacker can cause side - * > effects with an operation or can measure the timing of a read operation. Our - * > goal is to ensure that we don't run the context function or execute the - * > GraphQL operation until the browser has evaluated the CORS policy, which - * > means we want all operations to be pre-flighted. We can do that by only - * > processing operations that have at least one header set that appears to be - * > manually set by the JS code rather than by the browser automatically. - * - * > POST requests generally have a content-type `application/json`, which is - * > sufficient to trigger preflighting. So we take extra care with requests that - * > specify no content-type or that specify one of the three non-preflighted - * > content types. For those operations, we require (if this feature is enabled) - * > one of a set of specific headers to be set. By ensuring that every operation - * > either has a custom content-type or sets one of these headers, we know we - * > won't execute operations at the request of origins who our CORS policy will - * > block. - * - * From [Apollo Server](https://github.com/apollographql/apollo-server/blob/version-4/packages/server/src/preventCsrf.ts) - */ - fun assertGraphQLCsrf(headers: HttpHeaders) { - val contentType: MediaType? = headers.contentType - if (contentType != null && isPreflightedContentType(contentType)) { - // We managed to parse a MIME type that was not one of the - // CORS-safe-listed ones. (Probably application/json!) That means that if - // the client is a browser, the browser must have applied CORS - // preflighting, and we don't have to worry about CSRF. - return - } - // Either there was no content-type, or the content-type parsed properly as - // one of the three CORS-safelisted values. Let's look for another header that - // (if this was a browser) must have been set by the user's code and would - // have caused a preflight. - if (containsCSRFinFlightHeader(headers)) { - return - } - throw DgsGraphQLRequestHeaderValidator.GraphQLRequestHeaderRuleException( - "Expecting a CSRF Prevention Header but none was found, " + - "supported headers are $GRAPHQL_PREFLIGHT_REQUESTS_HEADERS.", - ) - } - - private fun isPreflightedContentType(mediaType: MediaType): Boolean = - NON_PREFLIGHTED_CONTENT_TYPES.find { - it.isCompatibleWith(mediaType) - } == null - - private fun containsCSRFinFlightHeader(headers: HttpHeaders): Boolean { - val csrfInFlightHeader: String? = - headers.keys.find { GRAPHQL_PREFLIGHT_REQUESTS_HEADERS.contains(it.lowercase()) } - return StringUtils.hasText(csrfInFlightHeader) - } - } - - override fun assert(headers: HttpHeaders) { - assertGraphQLCsrf(headers) - } -} diff --git a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/GraphQLMediaTypes.kt b/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/GraphQLMediaTypes.kt deleted file mode 100644 index 8693ca301..000000000 --- a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/GraphQLMediaTypes.kt +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.mvc - -import org.springframework.http.HttpHeaders -import org.springframework.http.MediaType - -@SuppressWarnings("unused") -object GraphQLMediaTypes { - val GRAPHQL_MEDIA_TYPE = MediaType("application", "graphql") - const val GRAPHQL_MEDIA_TYPE_VALUE = "application/graphql" - - fun includesApplicationGraphQL(headers: HttpHeaders): Boolean = GRAPHQL_MEDIA_TYPE.includes(headers.contentType) -} diff --git a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/GraphQLRequestContentTypePredicate.kt b/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/GraphQLRequestContentTypePredicate.kt deleted file mode 100644 index f31e4154e..000000000 --- a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/GraphQLRequestContentTypePredicate.kt +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.mvc - -import org.springframework.core.annotation.Order -import org.springframework.http.MediaType - -/** - * A [GraphQLRequestContentTypePredicate] is a predicate function that is meant to be be evaluated against the - * content-type expressed by the HTTP headers. - * - * @see DgsGraphQLRequestHeaderValidator - * @see DefaultDgsGraphQLRequestHeaderValidator - */ -@Order -fun interface GraphQLRequestContentTypePredicate { - fun accept(contentType: MediaType?): Boolean - - companion object { - /** The media-types that a GraphQL should strictly support.*/ - private val STRICT_GRAPHQL_CONTENT_TYPES = - listOf(MediaType.APPLICATION_JSON, GraphQLMediaTypes.GRAPHQL_MEDIA_TYPE, MediaType.MULTIPART_FORM_DATA) - - /** - * Implementation of a content type predicate that will accept none-null content-types that match any of the - * media-types defined by [STRICT_GRAPHQL_CONTENT_TYPES] - */ - val STRICT_GRAPHQL_CONTENT_TYPES_PREDICATE = - GraphQLRequestContentTypePredicate { mediaType -> - mediaType != null && STRICT_GRAPHQL_CONTENT_TYPES.find { it.isCompatibleWith(mediaType) } != null - } - - val RECOMMENDED_GRAPHQL_CONTENT_TYPE_PREDICATES = listOf(STRICT_GRAPHQL_CONTENT_TYPES_PREDICATE) - } -} diff --git a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/GraphQLRequestHeaderValidationRule.kt b/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/GraphQLRequestHeaderValidationRule.kt deleted file mode 100644 index e4d92d300..000000000 --- a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/GraphQLRequestHeaderValidationRule.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.mvc - -import com.netflix.graphql.dgs.mvc.DgsGraphQLRequestHeaderValidator.GraphQLRequestHeaderRuleException -import org.springframework.core.annotation.Order -import org.springframework.http.HttpHeaders - -/** - * Represents a function that has the intent to validate the HTTP Headers before the GraphQL Query is even parsed. - * For example, the [GraphQLCSRFRequestHeaderValidationRule] enforces a `content-type` policy that prevents a CSRF - * exploit for GraphQL endpoints. - */ -@Order -fun interface GraphQLRequestHeaderValidationRule { - /** - * Validate the [HttpHeaders], and in case it is not valid, throw a [GraphQLRequestHeaderRuleException] exception or any of its derivatives. - * @throws GraphQLRequestHeaderRuleException - */ - fun assert(headers: HttpHeaders) -} diff --git a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/ServletCookieValueResolver.kt b/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/ServletCookieValueResolver.kt deleted file mode 100644 index 6a502c2e4..000000000 --- a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/ServletCookieValueResolver.kt +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.mvc - -import com.netflix.graphql.dgs.internal.CookieValueResolver -import com.netflix.graphql.dgs.internal.DgsRequestData -import com.netflix.graphql.dgs.internal.DgsWebMvcRequestData -import org.springframework.web.context.request.ServletWebRequest -import org.springframework.web.util.WebUtils - -@Deprecated("Cookie resolving is now handled by ArgumentResolvers") -class ServletCookieValueResolver : CookieValueResolver { - override fun getCookieValue( - name: String, - requestData: DgsRequestData?, - ): String? = - if (requestData is DgsWebMvcRequestData) { - val webRequest = requestData.webRequest as ServletWebRequest - WebUtils.getCookie(webRequest.request, name)?.value - } else { - null - } -} diff --git a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/internal/method/HandlerMethodArgumentResolverAdapter.kt b/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/internal/method/HandlerMethodArgumentResolverAdapter.kt deleted file mode 100644 index cac770d73..000000000 --- a/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/internal/method/HandlerMethodArgumentResolverAdapter.kt +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.mvc.internal.method - -import com.netflix.graphql.dgs.context.DgsContext -import com.netflix.graphql.dgs.internal.DgsWebMvcRequestData -import com.netflix.graphql.dgs.internal.method.ArgumentResolver -import graphql.schema.DataFetchingEnvironment -import org.springframework.core.MethodParameter -import org.springframework.web.bind.support.WebDataBinderFactory -import org.springframework.web.context.request.NativeWebRequest -import org.springframework.web.method.support.HandlerMethodArgumentResolver - -/** - * [ArgumentResolver] adapter for Spring's [HandlerMethodArgumentResolver]. - * Allows leveraging Spring MVC adapters for things such as @CookieValue annotated - * methods. - */ -class HandlerMethodArgumentResolverAdapter( - private val delegate: HandlerMethodArgumentResolver, - private val webDataBinderFactory: WebDataBinderFactory? = null, -) : ArgumentResolver { - override fun supportsParameter(parameter: MethodParameter): Boolean = delegate.supportsParameter(parameter) - - override fun resolveArgument( - parameter: MethodParameter, - dfe: DataFetchingEnvironment, - ): Any? = delegate.resolveArgument(parameter, null, getRequest(dfe), webDataBinderFactory) - - private fun getRequest(dfe: DataFetchingEnvironment): NativeWebRequest { - val request = - when (val requestData = DgsContext.getRequestData(dfe)) { - is DgsWebMvcRequestData -> requestData.webRequest - else -> throw AssertionError() - } - return request as NativeWebRequest - } -} diff --git a/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/DgsMultipartPostControllerTest.kt b/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/DgsMultipartPostControllerTest.kt deleted file mode 100644 index db5139599..000000000 --- a/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/DgsMultipartPostControllerTest.kt +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.mvc - -import com.fasterxml.jackson.databind.ObjectMapper -import com.netflix.graphql.dgs.DgsQueryExecutor -import graphql.ExecutionResultImpl -import org.intellij.lang.annotations.Language -import org.junit.jupiter.api.Test -import org.mockito.ArgumentMatchers.any -import org.mockito.ArgumentMatchers.argThat -import org.mockito.ArgumentMatchers.eq -import org.mockito.Mockito.`when` -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.autoconfigure.SpringBootApplication -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest -import org.springframework.boot.test.mock.mockito.MockBean -import org.springframework.http.MediaType -import org.springframework.mock.web.MockMultipartFile -import org.springframework.test.web.servlet.MockMvc -import org.springframework.test.web.servlet.multipart -import org.springframework.web.multipart.MultipartFile - -@WebMvcTest(DgsRestController::class) -class DgsMultipartPostControllerTest { - @SpringBootApplication - open class App - - @MockBean - lateinit var dgsQueryExecutor: DgsQueryExecutor - - @Autowired - lateinit var objectMapper: ObjectMapper - - @Autowired - lateinit var mvc: MockMvc - - @Test - fun `Multipart form request should require a preflight header`() { - val queryString = "mutation(\$file: Upload!) {uploadFile(file: \$file)}" - - @Language("JSON") - val operation = - """ - { - "query": "$queryString", - "variables": { - "file": null - } - } - """.trimIndent() - - @Language("JSON") - val varParameters = """{"0": ["variables.file"]}""" - - val file1 = MockMultipartFile("foo", "foo.txt", MediaType.TEXT_PLAIN_VALUE, "Hello World".toByteArray()) - - `when`( - dgsQueryExecutor.execute( - eq(queryString), - any(), - any(), - any(), - any(), - any(), - ), - ).thenReturn( - ExecutionResultImpl.newExecutionResult().data(mapOf("Response" to "success")).build(), - ) - - mvc - .multipart("/graphql") { - contentType = MediaType.MULTIPART_FORM_DATA - param("operations", operation) - param("map", varParameters) - file(file1) - }.andExpect { - status { is4xxClientError() } - } - } - - @Test - fun singleFileUpload() { - @Language("JSON") - val operation = - """ - { - "query": "mutation(${'$'}file: Upload!) {uploadFile(file: ${'$'}file)}", - "variables": { - "file": null - } - } - """.trimIndent() - - @Language("JSON") - val varParameters = """{"foo": ["variables.file"]}""" - - val queryString = "mutation(\$file: Upload!) {uploadFile(file: \$file)}" - - `when`( - dgsQueryExecutor.execute( - eq(queryString), - argThat { variables -> variables["file"] is MultipartFile }, - any(), - any(), - any(), - any(), - ), - ).thenReturn( - ExecutionResultImpl.newExecutionResult().data(mapOf("Response" to "success")).build(), - ) - - mvc - .multipart("/graphql") { - contentType = MediaType.MULTIPART_FORM_DATA - header(GraphQLCSRFRequestHeaderValidationRule.HEADER_GRAPHQL_REQUIRE_PREFLIGHT, "true") - param("operations", operation) - param("map", varParameters) - file("foo", "Hello world".toByteArray()) - }.andExpect { - status { isOk() } - jsonPath("errors") { - doesNotExist() - } - jsonPath("data") { - isMap() - } - jsonPath("data.Response") { - value("success") - } - } - } - - @Test - fun multipleFileUpload() { - @Language("JSON") - val operation = - """ - { - "query": "mutation(${'$'}input: FileUploadInput!) {uploadFile(input: ${'$'}input)}", - "variables": { - "input": { - "description": "test", - "files": [null, null] - } - } - } - """.trimIndent() - - @Language("JSON") - val varParameters = """{"0": ["variables.input.files.0"], "1": ["variables.input.files.1"]}""" - - val queryString = "mutation(\$input: FileUploadInput!) {uploadFile(input: \$input)}" - - `when`( - dgsQueryExecutor.execute( - eq(queryString), - argThat { variables -> - val input = variables["input"] as Map<*, *> - val files = input["files"] - files is List<*> && files.size == 2 && files.all { it is MultipartFile } - }, - any(), - any(), - any(), - any(), - ), - ).thenReturn( - ExecutionResultImpl.newExecutionResult().data(mapOf("Response" to "success")).build(), - ) - - mvc - .multipart("/graphql") { - contentType = MediaType.MULTIPART_FORM_DATA - header(GraphQLCSRFRequestHeaderValidationRule.HEADER_GRAPHQL_REQUIRE_PREFLIGHT, "true") - param("operations", operation) - param("map", varParameters) - file("0", "Hello world".toByteArray()) - file("1", "This is an example".toByteArray()) - }.andExpect { - status { isOk() } - jsonPath("errors") { - doesNotExist() - } - jsonPath("data") { - isMap() - } - jsonPath("data.Response") { - value("success") - } - } - } - - @Test - fun arrayOfFilesUpload() { - @Language("JSON") - val operation = - """ - { - "query": "mutation(${'$'}files: [Upload!]!) {uploadFile(files: ${'$'}files)}", - "variables": { - "files": [null, null] - } - } - """.trimIndent() - - @Language("JSON") - val varParameters = """{"0": ["variables.files.0"], "1": ["variables.files.1"]}""" - - val queryString = "mutation(\$files: [Upload!]!) {uploadFile(files: \$files)}" - - `when`( - dgsQueryExecutor.execute( - eq(queryString), - argThat { variables -> - val files = variables["files"] - files is List<*> && files.size == 2 && files.all { it is MultipartFile } - }, - any(), - any(), - any(), - any(), - ), - ).thenReturn( - ExecutionResultImpl.newExecutionResult().data(mapOf("Response" to "success")).build(), - ) - - mvc - .multipart("/graphql") { - contentType = MediaType.MULTIPART_FORM_DATA - header(GraphQLCSRFRequestHeaderValidationRule.HEADER_GRAPHQL_REQUIRE_PREFLIGHT, "true") - param("operations", operation) - param("map", varParameters) - file("0", "Hello world".toByteArray()) - file("1", "This is an example".toByteArray()) - }.andExpect { - status { isOk() } - jsonPath("errors") { - doesNotExist() - } - jsonPath("data") { - isMap() - } - jsonPath("data.Response") { - value("success") - } - } - } - - @Test - fun incorrectFileUploadWithMissingParts() { - // Missing operations param - mvc - .multipart("/graphql") { - contentType = MediaType.MULTIPART_FORM_DATA - header(GraphQLCSRFRequestHeaderValidationRule.HEADER_GRAPHQL_REQUIRE_PREFLIGHT, "true") - param("map", """{"0": ["variables.file"]}""") - file("0", "Hello world".toByteArray()) - }.andExpect { - status { is4xxClientError() } - } - - @Language("JSON") - val operation = - """ - { - "query": "mutation(${'$'}files: [Upload!]!) {uploadFile(files: ${'$'}files)}", - "variables": { - "files": [null, null] - } - } - """.trimIndent() - - // Missing map param - mvc - .multipart("/graphql") { - contentType = MediaType.MULTIPART_FORM_DATA - header(GraphQLCSRFRequestHeaderValidationRule.HEADER_GRAPHQL_REQUIRE_PREFLIGHT, "true") - param("operations", operation) - file("0", "Hello world".toByteArray()) - }.andExpect { - status { is4xxClientError() } - } - } - - @Test - fun malformedFileUploadWithIncorrectMappedPath() { - @Language("JSON") - val operation = - """ - { - "query": "mutation(${'$'}file: Upload!) {uploadFile(file: ${'$'}file)}", - "variables": { - "file": null - } - } - """.trimIndent() - - // set up incorrect object mapping path - @Language("JSON") - val varParameters = """{"0": ["variables.file.0"]}""" - - mvc - .multipart("/graphql") { - contentType = MediaType.MULTIPART_FORM_DATA - header(GraphQLCSRFRequestHeaderValidationRule.HEADER_GRAPHQL_REQUIRE_PREFLIGHT, "true") - param("operations", operation) - param("map", varParameters) - file("0", "Hello world".toByteArray()) - }.andExpect { - status { is4xxClientError() } - } - } -} diff --git a/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/DgsRestControllerTest.kt b/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/DgsRestControllerTest.kt deleted file mode 100644 index 96eeed992..000000000 --- a/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/DgsRestControllerTest.kt +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.mvc - -import com.fasterxml.jackson.databind.ObjectMapper -import com.netflix.graphql.dgs.DgsQueryExecutor -import graphql.ExecutionResultImpl -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Test -import org.mockito.ArgumentCaptor -import org.mockito.ArgumentMatchers.any -import org.mockito.ArgumentMatchers.eq -import org.mockito.Mockito.`when` -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.autoconfigure.SpringBootApplication -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest -import org.springframework.boot.test.mock.mockito.MockBean -import org.springframework.http.MediaType -import org.springframework.test.web.servlet.MockMvc -import org.springframework.test.web.servlet.post - -@WebMvcTest(DgsRestController::class) -class DgsRestControllerTest { - @SpringBootApplication - open class App - - @MockBean - lateinit var dgsQueryExecutor: DgsQueryExecutor - - @Autowired - lateinit var objectMapper: ObjectMapper - - @Autowired - lateinit var mvc: MockMvc - - @Test - fun `Is able to execute a a well formed query`() { - val queryString = "query { hello }" - - `when`(dgsQueryExecutor.execute(eq(queryString), eq(emptyMap()), any(), any(), any(), any())).thenReturn( - ExecutionResultImpl.newExecutionResult().data(mapOf("hello" to "hello")).build(), - ) - - mvc - .post("/graphql") { - contentType = MediaType.APPLICATION_JSON - content = objectMapper.writeValueAsString(mapOf("query" to queryString)) - }.andExpect { - status { isOk() } - content { - jsonPath("errors") { - doesNotExist() - } - jsonPath("data") { - isMap() - } - jsonPath("data.hello") { - value("hello") - } - } - } - } - - @Test - fun `Is able to execute a a well formed query with null variables and extension`() { - val queryString = "query(\$stranger:String) {hello(name: \$stranger)}" - - `when`( - dgsQueryExecutor.execute( - eq(queryString), - any(), - any(), - any(), - any(), - any(), - ), - ).thenReturn( - ExecutionResultImpl.newExecutionResult().data(mapOf("hello" to "hello")).build(), - ) - - mvc - .post("/graphql") { - contentType = MediaType.APPLICATION_JSON - content = objectMapper.writeValueAsString(mapOf("query" to queryString, "variables" to null)) - }.andExpect { - status { isOk() } - content { - jsonPath("errors") { - doesNotExist() - } - jsonPath("data") { - isMap() - } - jsonPath("data.hello") { - value("hello") - } - } - } - } - - @Test - fun `Passing a query with an operationName should execute the matching named query`() { - val queryString = "query operationA{ hello } query operationB{ hi }" - val captor = ArgumentCaptor.forClass(String::class.java) - `when`(dgsQueryExecutor.execute(eq(queryString), eq(emptyMap()), any(), any(), captor.capture(), any())).thenReturn( - ExecutionResultImpl.newExecutionResult().data(mapOf("hi" to "there")).build(), - ) - - mvc - .post("/graphql") { - contentType = MediaType.APPLICATION_JSON - content = objectMapper.writeValueAsString(mapOf("query" to queryString, "operationName" to "operationB")) - }.andExpect { - status { isOk() } - content { - jsonPath("errors") { - doesNotExist() - } - jsonPath("data") { - isMap() - } - jsonPath("data.hi") { - value("there") - } - } - } - assertEquals("operationB", captor.value) - } - - @Test - fun `Content-type application graphql should be handled correctly`() { - val queryString = "{ hello }" - - `when`(dgsQueryExecutor.execute(eq(queryString), eq(emptyMap()), any(), any(), any(), any())).thenReturn( - ExecutionResultImpl.newExecutionResult().data(mapOf("hello" to "hello")).build(), - ) - - mvc - .post("/graphql") { - contentType = MediaType.parseMediaType("application/graphql") - content = queryString - }.andExpect { - status { isOk() } - content { - jsonPath("errors") { - doesNotExist() - } - jsonPath("data") { - isMap() - } - jsonPath("data.hello") { - value("hello") - } - } - } - } - - @Test - fun `Returns a request error if the no body is present`() { - mvc - .post("/graphql") { - contentType = MediaType.APPLICATION_JSON - }.andExpect { - status { isBadRequest() } - } - } - - @Test - fun `Writes response headers when dgs-response-headers are set in extensions object`() { - val queryString = "query { hello }" - - `when`(dgsQueryExecutor.execute(eq(queryString), eq(emptyMap()), any(), any(), any(), any())).thenReturn( - ExecutionResultImpl - .newExecutionResult() - .data(mapOf("hello" to "hello")) - .extensions(mapOf(DgsRestController.DGS_RESPONSE_HEADERS_KEY to mapOf("myHeader" to "hello"))) - .build(), - ) - - mvc - .post("/graphql") { - contentType = MediaType.APPLICATION_JSON - content = objectMapper.writeValueAsString(mapOf("query" to queryString)) - }.andExpect { - status { isOk() } - header { - string("myHeader", "hello") - } - content { - jsonPath("errors") { - doesNotExist() - } - jsonPath("extensions") { - doesNotExist() - } - jsonPath("data") { - isMap() - } - jsonPath("data.hello") { - value("hello") - } - } - } - } - - @Test - fun `Writes response headers when dgs-response-headers are set in extensions object with additional extensions`() { - val queryString = "query { hello }" - - `when`(dgsQueryExecutor.execute(eq(queryString), eq(emptyMap()), any(), any(), any(), any())).thenReturn( - ExecutionResultImpl - .newExecutionResult() - .data(mapOf("hello" to "hello")) - .extensions(mapOf("foo" to "bar", DgsRestController.DGS_RESPONSE_HEADERS_KEY to mapOf("myHeader" to "hello"))) - .build(), - ) - - mvc - .post("/graphql") { - contentType = MediaType.APPLICATION_JSON - content = objectMapper.writeValueAsString(mapOf("query" to queryString)) - }.andExpect { - status { isOk() } - header { - string("myHeader", "hello") - } - content { - jsonPath("errors") { - doesNotExist() - } - jsonPath("extensions") { - isMap() - } - jsonPath("extensions.foo") { - value("bar") - } - jsonPath("data") { - isMap() - } - jsonPath("data.hello") { - value("hello") - } - } - } - } -} diff --git a/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/DgsRestSchemaJsonControllerTest.kt b/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/DgsRestSchemaJsonControllerTest.kt deleted file mode 100644 index ef1e49f5b..000000000 --- a/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/DgsRestSchemaJsonControllerTest.kt +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.mvc - -import com.jayway.jsonpath.Configuration -import com.jayway.jsonpath.JsonPath -import com.jayway.jsonpath.Option -import com.netflix.graphql.dgs.internal.DgsSchemaProvider -import com.netflix.graphql.dgs.internal.SchemaProviderResult -import graphql.Scalars -import graphql.schema.GraphQLFieldDefinition -import graphql.schema.GraphQLObjectType -import graphql.schema.GraphQLSchema -import graphql.schema.idl.RuntimeWiring -import io.mockk.every -import io.mockk.impl.annotations.MockK -import io.mockk.junit5.MockKExtension -import org.assertj.core.api.Assertions.assertThat -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.extension.ExtendWith - -@ExtendWith(MockKExtension::class) -class DgsRestSchemaJsonControllerTest { - @MockK - lateinit var dgsSchemaProvider: DgsSchemaProvider - - @Test - fun normalFlow() { - val objectType: GraphQLObjectType = - GraphQLObjectType - .newObject() - .name("helloType") - .field( - GraphQLFieldDefinition - .newFieldDefinition() - .name("hello") - .type(Scalars.GraphQLString), - ).build() - val schema = - GraphQLSchema - .newSchema() - .clearSchemaDirectives() - .clearAdditionalTypes() - .clearDirectives() - .query(objectType) - .build() - - every { dgsSchemaProvider.schema() } returns SchemaProviderResult(schema, runtimeWiring = RuntimeWiring.MOCKED_WIRING) - - val result = DgsRestSchemaJsonController(dgsSchemaProvider).schema() - - val jsonPath = JsonPath.parse(result, Configuration.defaultConfiguration().addOptions(Option.SUPPRESS_EXCEPTIONS)) - assertThat(jsonPath.read("$.data.__schema.queryType.name")).isEqualTo("helloType") - assertThat(jsonPath.read("$.errors")).isNullOrEmpty() - } -} diff --git a/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/RequestHeaderTest.kt b/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/RequestHeaderTest.kt deleted file mode 100644 index d4fb015cb..000000000 --- a/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/RequestHeaderTest.kt +++ /dev/null @@ -1,308 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.mvc - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsData -import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry -import com.netflix.graphql.dgs.context.DgsContext -import com.netflix.graphql.dgs.internal.DgsSchemaProvider -import com.netflix.graphql.dgs.internal.DgsWebMvcRequestData -import com.netflix.graphql.dgs.internal.method.MethodDataFetcherFactory -import com.netflix.graphql.dgs.mvc.internal.method.HandlerMethodArgumentResolverAdapter -import graphql.ExecutionInput -import graphql.GraphQL -import graphql.schema.idl.SchemaParser -import graphql.schema.idl.TypeDefinitionRegistry -import org.junit.jupiter.api.Assertions -import org.junit.jupiter.api.Test -import org.springframework.context.support.GenericApplicationContext -import org.springframework.http.HttpHeaders -import org.springframework.mock.web.MockHttpServletRequest -import org.springframework.util.MultiValueMap -import org.springframework.web.bind.annotation.RequestHeader -import org.springframework.web.context.request.ServletWebRequest -import org.springframework.web.method.annotation.RequestHeaderMapMethodArgumentResolver -import org.springframework.web.method.annotation.RequestHeaderMethodArgumentResolver -import java.util.* - -class RequestHeaderTest { - private val applicationContext = GenericApplicationContext() - private val provider: DgsSchemaProvider by lazy { - DgsSchemaProvider( - applicationContext = applicationContext, - federationResolver = Optional.empty(), - existingTypeDefinitionRegistry = Optional.empty(), - methodDataFetcherFactory = - MethodDataFetcherFactory( - listOf( - HandlerMethodArgumentResolverAdapter(RequestHeaderMapMethodArgumentResolver()), - HandlerMethodArgumentResolverAdapter(RequestHeaderMethodArgumentResolver(applicationContext.beanFactory)), - ), - ), - ) - } - - @Test - fun `A @RequestHeader argument with multi-value map should be supported`() { - @DgsComponent - class Fetcher { - @DgsData(parentType = "Query", field = "hello") - fun someFetcher( - @RequestHeader headers: MultiValueMap, - ): String { - val header = headers.getFirst("Referer") - return "From, $header" - } - - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry = SchemaParser().parse("type Query { hello(name: String): String }") - } - - applicationContext.registerBean("helloFetcher", Fetcher::class.java, *emptyArray()) - applicationContext.refresh() - - val schema = provider.schema().graphQLSchema - - val build = GraphQL.newGraphQL(schema).build() - val httpHeaders = HttpHeaders() - httpHeaders.add("Referer", "localhost") - - val request = - ServletWebRequest( - MockHttpServletRequest().apply { - addHeader("Referer", "localhost") - }, - ) - - val executionResult = - build.execute( - ExecutionInput - .newExecutionInput("""{hello}""") - .graphQLContext(DgsContext(null, DgsWebMvcRequestData(emptyMap(), httpHeaders, request))), - ) - Assertions.assertTrue(executionResult.isDataPresent) - val data = executionResult.getData>() - Assertions.assertEquals("From, localhost", data["hello"]) - } - - @Test - fun `A @RequestHeader argument with a map should be supported`() { - @DgsComponent - class Fetcher { - @DgsData(parentType = "Query", field = "hello") - fun someFetcher( - @RequestHeader headers: Map, - ): String { - val header = headers["Referer"] - return "From, $header" - } - - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry = SchemaParser().parse("type Query { hello(name: String): String }") - } - - applicationContext.registerBean("helloFetcher", Fetcher::class.java, *emptyArray()) - applicationContext.refresh() - - val schema = provider.schema().graphQLSchema - - val build = GraphQL.newGraphQL(schema).build() - val httpHeaders = HttpHeaders() - httpHeaders.add("Referer", "localhost") - - val request = - ServletWebRequest( - MockHttpServletRequest().apply { - addHeader("Referer", "localhost") - }, - ) - - val executionResult = - build.execute( - ExecutionInput - .newExecutionInput("""{hello}""") - .graphQLContext(DgsContext(null, DgsWebMvcRequestData(emptyMap(), httpHeaders, request))), - ) - Assertions.assertTrue(executionResult.isDataPresent) - val data = executionResult.getData>() - Assertions.assertEquals("From, localhost", data["hello"]) - } - - @Test - fun `A @RequestHeader argument with HttpHeaders should be supported`() { - @DgsComponent - class Fetcher { - @DgsData(parentType = "Query", field = "hello") - fun someFetcher( - @RequestHeader headers: HttpHeaders, - ): String { - val header = headers.getFirst("Referer") - return "From, $header" - } - - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry = SchemaParser().parse("type Query { hello(name: String): String }") - } - - applicationContext.registerBean("helloFetcher", Fetcher::class.java, *emptyArray()) - applicationContext.refresh() - - val schema = provider.schema().graphQLSchema - - val build = GraphQL.newGraphQL(schema).build() - val httpHeaders = HttpHeaders() - httpHeaders.add("Referer", "localhost") - - val request = - ServletWebRequest( - MockHttpServletRequest().apply { - addHeader("Referer", "localhost") - }, - ) - - val executionResult = - build.execute( - ExecutionInput - .newExecutionInput("""{hello}""") - .graphQLContext(DgsContext(null, DgsWebMvcRequestData(emptyMap(), httpHeaders, request))), - ) - Assertions.assertTrue(executionResult.isDataPresent) - val data = executionResult.getData>() - Assertions.assertEquals("From, localhost", data["hello"]) - } - - @Test - fun `A @RequestHeader argument with explicit name should be supported`() { - @DgsComponent - class Fetcher { - @DgsData(parentType = "Query", field = "hello") - fun someFetcher( - @RequestHeader("referer") header: String, - ): String = "From, $header" - - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry = SchemaParser().parse("type Query { hello(name: String): String }") - } - - applicationContext.registerBean("helloFetcher", Fetcher::class.java, *emptyArray()) - applicationContext.refresh() - - val schema = provider.schema().graphQLSchema - - val build = GraphQL.newGraphQL(schema).build() - val httpHeaders = HttpHeaders() - httpHeaders.add("Referer", "localhost") - - val request = - ServletWebRequest( - MockHttpServletRequest().apply { - addHeader("Referer", "localhost") - }, - ) - - val executionResult = - build.execute( - ExecutionInput - .newExecutionInput("""{hello}""") - .graphQLContext(DgsContext(null, DgsWebMvcRequestData(emptyMap(), httpHeaders, request))), - ) - Assertions.assertTrue(executionResult.isDataPresent) - val data = executionResult.getData>() - Assertions.assertEquals("From, localhost", data["hello"]) - } - - @Test - fun `A @RequestHeader argument with explicit name argument should be supported`() { - @DgsComponent - class Fetcher { - @DgsData(parentType = "Query", field = "hello") - fun someFetcher( - @RequestHeader(name = "referer") header: String, - ): String = "From, $header" - - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry = SchemaParser().parse("type Query { hello(name: String): String }") - } - - applicationContext.registerBean("helloFetcher", Fetcher::class.java, *emptyArray()) - applicationContext.refresh() - - val schema = provider.schema().graphQLSchema - - val build = GraphQL.newGraphQL(schema).build() - val httpHeaders = HttpHeaders() - httpHeaders.add("Referer", "localhost") - - val request = - ServletWebRequest( - MockHttpServletRequest().apply { - addHeader("Referer", "localhost") - }, - ) - - val executionResult = - build.execute( - ExecutionInput - .newExecutionInput("""{hello}""") - .graphQLContext(DgsContext(null, DgsWebMvcRequestData(emptyMap(), httpHeaders, request))), - ) - Assertions.assertTrue(executionResult.isDataPresent) - val data = executionResult.getData>() - Assertions.assertEquals("From, localhost", data["hello"]) - } - - @Test - fun `A @RequestHeader argument with no name should use parameter name`() { - @DgsComponent - class Fetcher { - @DgsData(parentType = "Query", field = "hello") - fun someFetcher( - @RequestHeader referer: String, - ): String = "From, $referer" - - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry = SchemaParser().parse("type Query { hello(name: String): String }") - } - - applicationContext.registerBean("helloFetcher", Fetcher::class.java, *emptyArray()) - applicationContext.refresh() - - val schema = provider.schema().graphQLSchema - - val build = GraphQL.newGraphQL(schema).build() - val httpHeaders = HttpHeaders() - httpHeaders.add("Referer", "localhost") - - val request = - ServletWebRequest( - MockHttpServletRequest().apply { - addHeader("Referer", "localhost") - }, - ) - - val executionResult = - build.execute( - ExecutionInput - .newExecutionInput("""{hello}""") - .graphQLContext(DgsContext(null, DgsWebMvcRequestData(emptyMap(), httpHeaders, request))), - ) - Assertions.assertTrue(executionResult.isDataPresent) - val data = executionResult.getData>() - Assertions.assertEquals("From, localhost", data["hello"]) - } -} diff --git a/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/RequestParamTest.kt b/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/RequestParamTest.kt deleted file mode 100644 index df2bf4cdd..000000000 --- a/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/RequestParamTest.kt +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.mvc - -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsData -import com.netflix.graphql.dgs.DgsTypeDefinitionRegistry -import com.netflix.graphql.dgs.context.DgsContext -import com.netflix.graphql.dgs.internal.DgsSchemaProvider -import com.netflix.graphql.dgs.internal.DgsWebMvcRequestData -import com.netflix.graphql.dgs.internal.method.MethodDataFetcherFactory -import com.netflix.graphql.dgs.mvc.internal.method.HandlerMethodArgumentResolverAdapter -import graphql.ExecutionInput -import graphql.GraphQL -import graphql.schema.idl.SchemaParser -import graphql.schema.idl.TypeDefinitionRegistry -import org.junit.jupiter.api.Assertions -import org.junit.jupiter.api.Test -import org.springframework.context.support.GenericApplicationContext -import org.springframework.mock.web.MockHttpServletRequest -import org.springframework.web.bind.annotation.RequestParam -import org.springframework.web.context.request.ServletWebRequest -import org.springframework.web.method.annotation.RequestParamMapMethodArgumentResolver -import org.springframework.web.method.annotation.RequestParamMethodArgumentResolver -import java.util.* - -class RequestParamTest { - private val applicationContext = GenericApplicationContext() - private val provider: DgsSchemaProvider by lazy { - DgsSchemaProvider( - applicationContext = applicationContext, - federationResolver = Optional.empty(), - existingTypeDefinitionRegistry = Optional.empty(), - methodDataFetcherFactory = - MethodDataFetcherFactory( - listOf( - HandlerMethodArgumentResolverAdapter(RequestParamMapMethodArgumentResolver()), - HandlerMethodArgumentResolverAdapter(RequestParamMethodArgumentResolver(false)), - ), - ), - ) - } - - @Test - fun `A @RequestParam argument should be supported`() { - @DgsComponent - class Fetcher { - @DgsData(parentType = "Query", field = "hello") - fun someFetcher( - @RequestParam("message") input: String, - ): String = input - - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry = SchemaParser().parse("type Query { hello(name: String): String }") - } - - applicationContext.registerBean("helloFetcher", Fetcher::class.java, *emptyArray()) - applicationContext.refresh() - - val schema = provider.schema().graphQLSchema - - val build = GraphQL.newGraphQL(schema).build() - - val request = - ServletWebRequest( - MockHttpServletRequest().apply { - addParameter("message", "My param") - }, - ) - - val executionResult = - build.execute( - ExecutionInput - .newExecutionInput("""{hello}""") - .graphQLContext(DgsContext(null, DgsWebMvcRequestData(emptyMap(), null, request))), - ) - Assertions.assertTrue(executionResult.isDataPresent) - val data = executionResult.getData>() - Assertions.assertEquals("My param", data["hello"]) - } - - @Test - fun `A @RequestParam argument with name specified in 'name' argument should be supported`() { - @DgsComponent - class Fetcher { - @DgsData(parentType = "Query", field = "hello") - fun someFetcher( - @RequestParam(name = "message") input: String, - ): String = input - - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry = SchemaParser().parse("type Query { hello(name: String): String }") - } - - applicationContext.registerBean("helloFetcher", Fetcher::class.java, *emptyArray()) - applicationContext.refresh() - - val schema = provider.schema().graphQLSchema - - val build = GraphQL.newGraphQL(schema).build() - - val request = - ServletWebRequest( - MockHttpServletRequest().apply { - addParameter("message", "My param") - }, - ) - - val executionResult = - build.execute( - ExecutionInput - .newExecutionInput("""{hello}""") - .graphQLContext(DgsContext(null, DgsWebMvcRequestData(emptyMap(), null, request))), - ) - Assertions.assertTrue(executionResult.isDataPresent) - val data = executionResult.getData>() - Assertions.assertEquals("My param", data["hello"]) - } - - @Test - fun `A @RequestParam argument with no explicit name should use parameter name`() { - @DgsComponent - class Fetcher { - @DgsData(parentType = "Query", field = "hello") - fun someFetcher( - @RequestParam message: String, - ): String = message - - @DgsTypeDefinitionRegistry - fun typeDefinitionRegistry(): TypeDefinitionRegistry = SchemaParser().parse("type Query { hello(name: String): String }") - } - - applicationContext.registerBean("helloFetcher", Fetcher::class.java, *emptyArray()) - applicationContext.refresh() - - val schema = provider.schema().graphQLSchema - - val build = GraphQL.newGraphQL(schema).build() - - val request = - ServletWebRequest( - MockHttpServletRequest().apply { - addParameter("message", "My param") - }, - ) - - val executionResult = - build.execute( - ExecutionInput - .newExecutionInput("""{hello}""") - .graphQLContext(DgsContext(null, DgsWebMvcRequestData(emptyMap(), null, request))), - ) - Assertions.assertTrue(executionResult.isDataPresent) - val data = executionResult.getData>() - Assertions.assertEquals("My param", data["hello"]) - } -} diff --git a/graphql-dgs-subscriptions-graphql-sse-autoconfigure/build.gradle.kts b/graphql-dgs-subscriptions-graphql-sse-autoconfigure/build.gradle.kts deleted file mode 100644 index 5b11595b9..000000000 --- a/graphql-dgs-subscriptions-graphql-sse-autoconfigure/build.gradle.kts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -dependencies { - implementation(project(":graphql-dgs")) - implementation(project(":graphql-dgs-subscriptions-graphql-sse")) - implementation("org.springframework:spring-web") - implementation("org.springframework:spring-webmvc") - implementation("org.springframework.boot:spring-boot-autoconfigure") -} diff --git a/graphql-dgs-subscriptions-graphql-sse-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/graphql/sse/DgsGraphQLSSEAutoConfig.kt b/graphql-dgs-subscriptions-graphql-sse-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/graphql/sse/DgsGraphQLSSEAutoConfig.kt deleted file mode 100644 index 0c672113f..000000000 --- a/graphql-dgs-subscriptions-graphql-sse-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/graphql/sse/DgsGraphQLSSEAutoConfig.kt +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2023 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.subscriptions.graphql.sse - -import com.netflix.graphql.dgs.DgsQueryExecutor -import org.springframework.beans.factory.annotation.Value -import org.springframework.boot.autoconfigure.AutoConfiguration -import org.springframework.boot.autoconfigure.condition.ConditionalOnClass -import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication -import org.springframework.context.annotation.Bean -import org.springframework.web.servlet.DispatcherServlet - -@AutoConfiguration -@ConditionalOnWebApplication -@ConditionalOnClass(DispatcherServlet::class) -open class DgsGraphQLSSEAutoConfig( - @Value("\${dgs.graphql.sse.pollPeriod:12000}") open val pollPeriod: Long, -) { - @Bean - open fun dgsGraphQlSseController(dgsQueryExecutor: DgsQueryExecutor): DgsGraphQLSSESubscriptionHandler = - DgsGraphQLSSESubscriptionHandler(dgsQueryExecutor, pollPeriod) -} diff --git a/graphql-dgs-subscriptions-graphql-sse-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/graphql-dgs-subscriptions-graphql-sse-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index f25b404d7..000000000 --- a/graphql-dgs-subscriptions-graphql-sse-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1 +0,0 @@ -com.netflix.graphql.dgs.subscriptions.graphql.sse.DgsGraphQLSSEAutoConfig diff --git a/graphql-dgs-subscriptions-graphql-sse/build.gradle.kts b/graphql-dgs-subscriptions-graphql-sse/build.gradle.kts deleted file mode 100644 index 672d42cc2..000000000 --- a/graphql-dgs-subscriptions-graphql-sse/build.gradle.kts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2023 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -dependencies { - implementation(project(":graphql-dgs")) - implementation(project(":graphql-dgs-subscription-types")) - implementation("com.fasterxml.jackson.module:jackson-module-kotlin") - implementation("org.springframework:spring-web") - implementation("org.springframework:spring-webmvc") - implementation("io.projectreactor:reactor-core") - - testImplementation("io.projectreactor:reactor-test") - testImplementation("org.springframework.boot:spring-boot-starter-test") - testImplementation("org.springframework.boot:spring-boot-starter-tomcat") -} diff --git a/graphql-dgs-subscriptions-graphql-sse/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/graphql/sse/DgsGraphQLSSESubscriptionHandler.kt b/graphql-dgs-subscriptions-graphql-sse/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/graphql/sse/DgsGraphQLSSESubscriptionHandler.kt deleted file mode 100644 index ab7f969bf..000000000 --- a/graphql-dgs-subscriptions-graphql-sse/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/graphql/sse/DgsGraphQLSSESubscriptionHandler.kt +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright 2023 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.subscriptions.graphql.sse - -import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.types.subscription.QueryPayload -import com.netflix.graphql.types.subscription.SSEDataPayload -import graphql.ExecutionResult -import graphql.InvalidSyntaxError -import graphql.language.OperationDefinition -import graphql.parser.InvalidSyntaxException -import graphql.parser.Parser -import graphql.validation.ValidationError -import org.intellij.lang.annotations.Language -import org.reactivestreams.Publisher -import org.slf4j.Logger -import org.slf4j.LoggerFactory -import org.springframework.beans.factory.annotation.Value -import org.springframework.http.MediaType -import org.springframework.http.codec.ServerSentEvent -import org.springframework.web.bind.annotation.PostMapping -import org.springframework.web.bind.annotation.RequestBody -import org.springframework.web.bind.annotation.RestController -import org.springframework.web.server.ServerErrorException -import org.springframework.web.server.ServerWebInputException -import reactor.core.Disposable -import reactor.core.publisher.Flux -import reactor.core.publisher.Sinks -import reactor.core.scheduler.Schedulers -import java.time.Duration -import java.util.UUID -import com.netflix.graphql.types.subscription.Error as SseError - -private const val COMPLETE_EVENT = "complete" - -private const val NEXT_EVENT = "next" - -private const val EMPTY_STRING = "" - -/** - * This class is defined as "open" only for proxy/aop use cases. It is not considered part of the API, and backwards compatibility is not guaranteed. - * Do not manually extend this class. - */ -@RestController -open class DgsGraphQLSSESubscriptionHandler( - open val dgsQueryExecutor: DgsQueryExecutor, - @Value("\${dgs.graphql.sse.pollPeriod:12000}") open val pollPeriod: Long, -) { - @PostMapping("\${dgs.graphql.sse.path:/subscriptions}", produces = [MediaType.TEXT_EVENT_STREAM_VALUE]) - fun subscriptionFromPost( - @RequestBody body: String, - ): Flux> = handleSubscription(body) - - private fun handleSubscription( - @Language("graphql") query: String, - ): Flux> { - val queryPayload = - try { - mapper.readValue(query, QueryPayload::class.java) - } catch (ex: Exception) { - throw ServerWebInputException("Error parsing query: ${ex.message}") - } - - if (!isSubscriptionQuery(queryPayload.query)) { - throw ServerWebInputException("Invalid query. operation type is not a subscription") - } - - val executionResult: ExecutionResult = dgsQueryExecutor.execute(queryPayload.query, queryPayload.variables.orEmpty()) - if (executionResult.errors.isNotEmpty()) { - val errorMessage = - if (executionResult.errors.any { error -> error is ValidationError || error is InvalidSyntaxError }) { - "Subscription query failed to validate: ${executionResult.errors.joinToString()}" - } else { - "Error executing subscription query: ${executionResult.errors.joinToString()}" - } - logger.error(errorMessage) - throw ServerWebInputException(errorMessage) - } - - val publisher = - try { - executionResult.getData>() - } catch (exc: ClassCastException) { - logger.error( - "Invalid return type for subscription datafetcher. A subscription datafetcher must return a Publisher. The query was {}", - query, - exc, - ) - throw ServerErrorException( - "Invalid return type for subscription datafetcher. Was a non-subscription query send to the subscription endpoint?", - exc, - ) - } - - val subscriptionId = - if (queryPayload.key == EMPTY_STRING) { - UUID.randomUUID().toString() - } else { - queryPayload.key - } - val resultPublisher = - Flux - .from(publisher) - .map { - val payload = SSEDataPayload(data = it.getData(), errors = it.errors, subId = subscriptionId) - ServerSentEvent - .builder(mapper.writeValueAsString(payload)) - .id(UUID.randomUUID().toString()) - .event(NEXT_EVENT) - .build() - }.onErrorResume { exc -> - logger.warn("An exception occurred on subscription {}", subscriptionId, exc) - val errorMessage = exc.message ?: "An exception occurred" - val payload = - SSEDataPayload(data = null, errors = listOf(SseError(errorMessage)), subId = subscriptionId) - Flux.just( - ServerSentEvent - .builder(mapper.writeValueAsString(payload)) - .id(UUID.randomUUID().toString()) - .event(NEXT_EVENT) - .build(), - ) - } - val sink = Sinks.many().unicast().onBackpressureBuffer>() - val disposables: MutableList = mutableListOf() - val dis = - resultPublisher - .map { - sink.tryEmitNext(it) - }.doFinally { - sink.tryEmitNext( - ServerSentEvent - .builder(EMPTY_STRING) - .id(UUID.randomUUID().toString()) - .event(COMPLETE_EVENT) - .build(), - ) - sink.tryEmitComplete() - }.subscribeOn(Schedulers.boundedElastic()) - .subscribe() - disposables.add(dis) - if (pollPeriod.toInt() != 0) { - val pollDis = - Flux - .interval(Duration.ZERO, Duration.ofMillis(pollPeriod)) - .map { - sink.tryEmitNext(ServerSentEvent.builder().comment("").build()) - }.subscribeOn(Schedulers.boundedElastic()) - .subscribe() - disposables.add(pollDis) - } - return sink.asFlux().doFinally { - disposables.forEach(Disposable::dispose) - } - } - - private fun isSubscriptionQuery( - @Language("graphql") query: String, - ): Boolean { - val document = - try { - Parser().parseDocument(query) - } catch (exc: InvalidSyntaxException) { - return false - } - val definitions = document.getDefinitionsOfType(OperationDefinition::class.java) - return definitions.isNotEmpty() && - definitions.all { def -> def.operation == OperationDefinition.Operation.SUBSCRIPTION } - } - - companion object { - private val mapper = jacksonObjectMapper() - private val logger: Logger = LoggerFactory.getLogger(DgsGraphQLSSESubscriptionHandler::class.java) - } -} diff --git a/graphql-dgs-subscriptions-graphql-sse/src/test/kotlin/com/netflix/graphql/dgs/subscriptions/graphql/sse/DgsGraphQLSSESubscriptionHandlerTest.kt b/graphql-dgs-subscriptions-graphql-sse/src/test/kotlin/com/netflix/graphql/dgs/subscriptions/graphql/sse/DgsGraphQLSSESubscriptionHandlerTest.kt deleted file mode 100644 index b2a9a0ba6..000000000 --- a/graphql-dgs-subscriptions-graphql-sse/src/test/kotlin/com/netflix/graphql/dgs/subscriptions/graphql/sse/DgsGraphQLSSESubscriptionHandlerTest.kt +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Copyright 2023 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.subscriptions.graphql.sse - -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper -import com.fasterxml.jackson.module.kotlin.readValue -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.types.subscription.QueryPayload -import com.netflix.graphql.types.subscription.SSEDataPayload -import graphql.ExecutionResultImpl -import graphql.GraphqlErrorBuilder -import graphql.validation.ValidationError -import org.hamcrest.CoreMatchers.containsString -import org.hamcrest.MatcherAssert.assertThat -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Disabled -import org.junit.jupiter.api.Test -import org.mockito.ArgumentMatchers.eq -import org.mockito.Mockito.any -import org.mockito.Mockito.`when` -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.autoconfigure.SpringBootApplication -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest -import org.springframework.boot.test.mock.mockito.MockBean -import org.springframework.http.MediaType -import org.springframework.test.web.servlet.MockMvc -import org.springframework.test.web.servlet.request.MockMvcRequestBuilders.asyncDispatch -import org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post -import org.springframework.test.web.servlet.result.MockMvcResultMatchers.content -import org.springframework.test.web.servlet.result.MockMvcResultMatchers.request -import org.springframework.test.web.servlet.result.MockMvcResultMatchers.status -import reactor.core.publisher.Flux - -@Disabled("Avoiding stuck builds") -@WebMvcTest(DgsGraphQLSSESubscriptionHandler::class, DgsGraphQLSSESubscriptionHandlerTest.App::class) -internal class DgsGraphQLSSESubscriptionHandlerTest { - @SpringBootApplication - open class App - - @Autowired - lateinit var mockMvc: MockMvc - - @MockBean - lateinit var dgsQueryExecutor: DgsQueryExecutor - - private val mapper: ObjectMapper = jacksonObjectMapper() - - @Test - fun queryError() { - val query = "subscription { stocks { name, price }}" - val queryPayload = QueryPayload(operationName = "MySubscription", query = query) - val executionResult = - ExecutionResultImpl - .newExecutionResult() - .errors(listOf(GraphqlErrorBuilder.newError().message("broken").build())) - .build() - - `when`(dgsQueryExecutor.execute(eq(query), any())).thenReturn(executionResult) - - mockMvc - .perform(post("/subscriptions").content(mapper.writeValueAsString(queryPayload))) - .andExpect(status().is4xxClientError) - } - - @Test - fun queryValidationError() { - val query = "subscription { stocks { name, price }}" - val queryPayload = QueryPayload(operationName = "MySubscription", query = query) - - val executionResult = - ExecutionResultImpl - .newExecutionResult() - .errors(listOf(ValidationError.newValidationError().build())) - .build() - - `when`(dgsQueryExecutor.execute(eq(query), any())).thenReturn(executionResult) - - mockMvc - .perform(post("/subscriptions").content(mapper.writeValueAsString(queryPayload))) - .andExpect(status().is4xxClientError) - } - - @Test - fun invalidJson() { - mockMvc - .perform(post("/subscriptions").content(mapper.writeValueAsString("not json"))) - .andExpect(status().is4xxClientError) - } - - @Test - fun notAPublisherServerError() { - val query = "subscription { stocks { name, price }}" - val queryPayload = QueryPayload(operationName = "MySubscription", query = query) - - val executionResult = - ExecutionResultImpl - .newExecutionResult() - .data("not a publisher") - .build() - - `when`(dgsQueryExecutor.execute(eq(query), any())).thenReturn(executionResult) - - mockMvc - .perform(post("/subscriptions").content(mapper.writeValueAsString(queryPayload))) - .andExpect(status().is5xxServerError) - } - - @Test - fun notAPublisherClientError() { - // Not a subscription query - val query = "query { stocks { name, price }}" - val queryPayload = QueryPayload(operationName = "MySubscription", query = query) - - val executionResult = - ExecutionResultImpl - .newExecutionResult() - .data(mapOf("stocks" to listOf(mapOf("name" to "VTI", "price" to 200)))) - .build() - - `when`(dgsQueryExecutor.execute(eq(query), any())).thenReturn(executionResult) - - mockMvc - .perform(post("/subscriptions").content(mapper.writeValueAsString(queryPayload))) - .andExpect(status().is4xxClientError) - } - - @Test - fun success() { - val query = "subscription { stocks { name, price }}" - val queryPayload = QueryPayload(operationName = "MySubscription", query = query) - - val publisher = - Flux.just( - ExecutionResultImpl.newExecutionResult().data("message 1").build(), - ExecutionResultImpl.newExecutionResult().data("message 2").build(), - ) - val executionResult = - ExecutionResultImpl - .newExecutionResult() - .data(publisher) - .build() - - `when`(dgsQueryExecutor.execute(eq(query), any())).thenReturn(executionResult) - - val result = - mockMvc - .perform(post("/subscriptions").content(mapper.writeValueAsString(queryPayload))) - .andExpect(request().asyncStarted()) - .andExpect(status().is2xxSuccessful) - .andReturn() - - mockMvc - .perform(asyncDispatch(result)) - .andExpect(content().contentType(MediaType.TEXT_EVENT_STREAM)) - .andReturn() - val data = - result.response.contentAsString - .splitToSequence("\n\n") - .filter { line -> line.contains("event:next") } - .map { line -> line.substring("data:".length).substringAfter("data:") } - .map { line -> mapper.readValue(line) } - .toList() - - assertEquals(2, data.size) - assertEquals("message 1", data[0].data) - assertEquals("message 2", data[1].data) - val events = - result.response.contentAsString - .splitToSequence("\n\n") - .filter { line -> line.contains("event:") } - .map { line -> line.substringAfter("event:").substringBefore("\n") } - .toList() - assertEquals(3, events.size) - assertEquals("next", events[0]) - assertEquals("next", events[1]) - assertEquals("complete", events[2]) - // Ensure ping message is sent - assertThat(result.response.contentAsString, containsString(":\n\n")) - } - - @Test - fun failure() { - val query = "subscription { stocks { name, price }}" - val queryPayload = QueryPayload(operationName = "MySubscription", query = query) - - val publisher = Flux.just(1).map { throw RuntimeException("test") } - val executionResult = - ExecutionResultImpl - .newExecutionResult() - .data(publisher) - .build() - - `when`(dgsQueryExecutor.execute(eq(query), any())).thenReturn(executionResult) - - val result = - mockMvc - .perform(post("/subscriptions").content(mapper.writeValueAsString(queryPayload))) - .andExpect(request().asyncStarted()) - .andExpect(status().is2xxSuccessful) - .andReturn() - - mockMvc - .perform(asyncDispatch(result)) - .andExpect(content().contentType(MediaType.TEXT_EVENT_STREAM)) - .andReturn() - - val data = - result.response.contentAsString - .splitToSequence("\n\n") - .filter { line -> line.contains("event:next") } - .map { line -> line.substring("data:".length).substringAfter("data:") } - .map { line -> mapper.readValue(line) } - .toList() - - assertEquals(1, data.size) - assertEquals("{message=test}", data[0].errors?.get(0).toString()) - val events = - result.response.contentAsString - .splitToSequence("\n\n") - .filter { line -> line.contains("event:") } - .map { line -> line.substringAfter("event:").substringBefore("\n") } - .toList() - assertEquals(2, events.size) - assertEquals("next", events[0]) - assertEquals("complete", events[1]) - } -} diff --git a/graphql-dgs-subscriptions-sse-autoconfigure/build.gradle.kts b/graphql-dgs-subscriptions-sse-autoconfigure/build.gradle.kts deleted file mode 100644 index 06e91a064..000000000 --- a/graphql-dgs-subscriptions-sse-autoconfigure/build.gradle.kts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -dependencies { - implementation(project(":graphql-dgs")) - implementation(project(":graphql-dgs-subscriptions-sse")) - implementation("org.springframework:spring-web") - implementation("org.springframework:spring-webmvc") - implementation("org.springframework.boot:spring-boot-autoconfigure") -} diff --git a/graphql-dgs-subscriptions-sse-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/sse/DgsSSEAutoConfig.kt b/graphql-dgs-subscriptions-sse-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/sse/DgsSSEAutoConfig.kt deleted file mode 100644 index 808fbe917..000000000 --- a/graphql-dgs-subscriptions-sse-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/sse/DgsSSEAutoConfig.kt +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.subscriptions.sse - -import com.netflix.graphql.dgs.DgsQueryExecutor -import org.springframework.boot.autoconfigure.AutoConfiguration -import org.springframework.boot.autoconfigure.condition.ConditionalOnClass -import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication -import org.springframework.context.annotation.Bean -import org.springframework.web.servlet.DispatcherServlet - -@AutoConfiguration -@ConditionalOnWebApplication -@ConditionalOnClass(DispatcherServlet::class) -open class DgsSSEAutoConfig { - @Bean - open fun dgsSseController(dgsQueryExecutor: DgsQueryExecutor): DgsSSESubscriptionHandler = DgsSSESubscriptionHandler(dgsQueryExecutor) -} diff --git a/graphql-dgs-subscriptions-sse-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/graphql-dgs-subscriptions-sse-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index 245597574..000000000 --- a/graphql-dgs-subscriptions-sse-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1 +0,0 @@ -com.netflix.graphql.dgs.subscriptions.sse.DgsSSEAutoConfig diff --git a/graphql-dgs-subscriptions-sse/build.gradle.kts b/graphql-dgs-subscriptions-sse/build.gradle.kts deleted file mode 100644 index 84e117415..000000000 --- a/graphql-dgs-subscriptions-sse/build.gradle.kts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -dependencies { - implementation(project(":graphql-dgs")) - implementation(project(":graphql-dgs-subscription-types")) - implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8") - implementation("com.fasterxml.jackson.module:jackson-module-kotlin") - implementation("org.springframework:spring-web") - implementation("org.springframework:spring-webmvc") - implementation("io.projectreactor:reactor-core") - - testImplementation("io.projectreactor:reactor-test") - testImplementation("org.springframework.boot:spring-boot-starter-test") - testImplementation("org.springframework.boot:spring-boot-starter-tomcat") -} diff --git a/graphql-dgs-subscriptions-sse/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/sse/DgsSSESubscriptionHandler.kt b/graphql-dgs-subscriptions-sse/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/sse/DgsSSESubscriptionHandler.kt deleted file mode 100644 index a5279c140..000000000 --- a/graphql-dgs-subscriptions-sse/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/sse/DgsSSESubscriptionHandler.kt +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.subscriptions.sse - -import com.fasterxml.jackson.databind.ObjectMapper -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.types.subscription.QueryPayload -import com.netflix.graphql.types.subscription.SSEDataPayload -import graphql.ExecutionResult -import graphql.InvalidSyntaxError -import graphql.language.OperationDefinition -import graphql.parser.InvalidSyntaxException -import graphql.parser.Parser -import graphql.validation.ValidationError -import org.intellij.lang.annotations.Language -import org.reactivestreams.Publisher -import org.slf4j.Logger -import org.slf4j.LoggerFactory -import org.springframework.http.MediaType -import org.springframework.http.codec.ServerSentEvent -import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder -import org.springframework.web.bind.annotation.GetMapping -import org.springframework.web.bind.annotation.PostMapping -import org.springframework.web.bind.annotation.RequestBody -import org.springframework.web.bind.annotation.RequestParam -import org.springframework.web.bind.annotation.RestController -import org.springframework.web.server.ServerErrorException -import org.springframework.web.server.ServerWebInputException -import reactor.core.publisher.Flux -import java.nio.charset.StandardCharsets -import java.util.Base64 -import java.util.UUID -import com.netflix.graphql.types.subscription.Error as SseError - -/** - * This class is defined as "open" only for proxy/aop use cases. It is not considered part of the API, and backwards compatibility is not guaranteed. - * Do not manually extend this class. - */ -@RestController -open class DgsSSESubscriptionHandler( - open val dgsQueryExecutor: DgsQueryExecutor, -) { - @GetMapping("\${dgs.graphql.sse.path:/subscriptions}", produces = [MediaType.TEXT_EVENT_STREAM_VALUE]) - fun subscriptionWithId( - @RequestParam("query") queryBase64: String, - ): Flux> { - val query = - try { - String(Base64.getDecoder().decode(queryBase64), StandardCharsets.UTF_8) - } catch (ex: IllegalArgumentException) { - throw ServerWebInputException("Error decoding base64-encoded query") - } - return handleSubscription(query) - } - - @PostMapping("\${dgs.graphql.sse.path:/subscriptions}", produces = [MediaType.TEXT_EVENT_STREAM_VALUE]) - fun subscriptionFromPost( - @RequestBody body: String, - ): Flux> = handleSubscription(body) - - private fun handleSubscription( - @Language("graphql") query: String, - ): Flux> { - val queryPayload = - try { - mapper.readValue(query, QueryPayload::class.java) - } catch (ex: Exception) { - throw ServerWebInputException("Error parsing query: ${ex.message}") - } - - if (!isSubscriptionQuery(queryPayload.query)) { - throw ServerWebInputException("Invalid query. operation type is not a subscription") - } - - val executionResult: ExecutionResult = dgsQueryExecutor.execute(queryPayload.query, queryPayload.variables.orEmpty()) - if (executionResult.errors.isNotEmpty()) { - val errorMessage = - if (executionResult.errors.any { error -> error is ValidationError || error is InvalidSyntaxError }) { - "Subscription query failed to validate: ${executionResult.errors.joinToString()}" - } else { - "Error executing subscription query: ${executionResult.errors.joinToString()}" - } - logger.error(errorMessage) - throw ServerWebInputException(errorMessage) - } - - val publisher = - try { - executionResult.getData>() - } catch (exc: ClassCastException) { - logger.error( - "Invalid return type for subscription datafetcher. A subscription datafetcher must return a Publisher. The query was {}", - query, - exc, - ) - throw ServerErrorException( - "Invalid return type for subscription datafetcher. Was a non-subscription query send to the subscription endpoint?", - exc, - ) - } - - val subscriptionId = - if (queryPayload.key == "") { - UUID.randomUUID().toString() - } else { - queryPayload.key - } - return Flux - .from(publisher) - .map { - val payload = SSEDataPayload(data = it.getData(), errors = it.errors, subId = subscriptionId) - ServerSentEvent - .builder(mapper.writeValueAsString(payload)) - .id(UUID.randomUUID().toString()) - .event("next") - .build() - }.onErrorResume { exc -> - logger.warn("An exception occurred on subscription {}", subscriptionId, exc) - val errorMessage = exc.message ?: "An exception occurred" - val payload = SSEDataPayload(data = null, errors = listOf(SseError(errorMessage)), subId = subscriptionId) - Flux.just( - ServerSentEvent - .builder(mapper.writeValueAsString(payload)) - .id(UUID.randomUUID().toString()) - .event("error") - .build(), - ) - } - } - - private fun isSubscriptionQuery( - @Language("graphql") query: String, - ): Boolean { - val document = - try { - Parser().parseDocument(query) - } catch (exc: InvalidSyntaxException) { - return false - } - val definitions = document.getDefinitionsOfType(OperationDefinition::class.java) - return definitions.isNotEmpty() && - definitions.all { def -> def.operation == OperationDefinition.Operation.SUBSCRIPTION } - } - - companion object { - private val mapper: ObjectMapper = Jackson2ObjectMapperBuilder.json().build() - private val logger: Logger = LoggerFactory.getLogger(DgsSSESubscriptionHandler::class.java) - } -} diff --git a/graphql-dgs-subscriptions-sse/src/test/kotlin/com/netflix/graphql/dgs/subscriptions/sse/DgsSSESubscriptionHandlerTest.kt b/graphql-dgs-subscriptions-sse/src/test/kotlin/com/netflix/graphql/dgs/subscriptions/sse/DgsSSESubscriptionHandlerTest.kt deleted file mode 100644 index 8921eec5a..000000000 --- a/graphql-dgs-subscriptions-sse/src/test/kotlin/com/netflix/graphql/dgs/subscriptions/sse/DgsSSESubscriptionHandlerTest.kt +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.subscriptions.sse - -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper -import com.fasterxml.jackson.module.kotlin.readValue -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.types.subscription.QueryPayload -import com.netflix.graphql.types.subscription.SSEDataPayload -import graphql.ExecutionResultImpl -import graphql.GraphqlErrorBuilder -import graphql.validation.ValidationError -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Disabled -import org.junit.jupiter.api.Test -import org.mockito.ArgumentMatchers.eq -import org.mockito.Mockito.any -import org.mockito.Mockito.`when` -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.autoconfigure.SpringBootApplication -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest -import org.springframework.boot.test.mock.mockito.MockBean -import org.springframework.http.MediaType -import org.springframework.test.web.servlet.MockMvc -import org.springframework.test.web.servlet.request.MockMvcRequestBuilders.asyncDispatch -import org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get -import org.springframework.test.web.servlet.result.MockMvcResultMatchers.content -import org.springframework.test.web.servlet.result.MockMvcResultMatchers.request -import org.springframework.test.web.servlet.result.MockMvcResultMatchers.status -import reactor.core.publisher.Flux -import java.util.Base64 -import java.util.Optional - -@Disabled("Avoiding stuck builds") -@WebMvcTest(DgsSSESubscriptionHandler::class, DgsSSESubscriptionHandlerTest.App::class) -internal class DgsSSESubscriptionHandlerTest { - @SpringBootApplication - open class App - - @Autowired - lateinit var mockMvc: MockMvc - - @MockBean - lateinit var dgsQueryExecutor: DgsQueryExecutor - - private val mapper: ObjectMapper = jacksonObjectMapper() - - @Test - fun queryError() { - val query = "subscription { stocks { name, price }}" - val queryPayload = QueryPayload(operationName = "MySubscription", query = query) - val encodedQuery = Base64.getEncoder().encodeToString(mapper.writeValueAsBytes(queryPayload)) - val executionResult = - ExecutionResultImpl - .newExecutionResult() - .errors(listOf(GraphqlErrorBuilder.newError().message("broken").build())) - .build() - - `when`(dgsQueryExecutor.execute(eq(query), any())).thenReturn(executionResult) - - mockMvc - .perform(get("/subscriptions").param("query", encodedQuery)) - .andExpect(status().is4xxClientError) - } - - @Test - fun base64Error() { - mockMvc - .perform(get("/subscriptions").param("query", "notbase64")) - .andExpect(status().is4xxClientError) - } - - @Test - fun queryValidationError() { - val query = "subscription { stocks { name, price }}" - val queryPayload = QueryPayload(operationName = "MySubscription", query = query) - val encodedQuery = Base64.getEncoder().encodeToString(mapper.writeValueAsBytes(queryPayload)) - - val executionResult = - ExecutionResultImpl - .newExecutionResult() - .errors(listOf(ValidationError.newValidationError().build())) - .build() - - `when`(dgsQueryExecutor.execute(eq(query), any())).thenReturn(executionResult) - - mockMvc - .perform(get("/subscriptions").param("query", encodedQuery)) - .andExpect(status().is4xxClientError) - } - - @Test - fun invalidJson() { - val encodedQuery = Base64.getEncoder().encodeToString("not json".toByteArray()) - - mockMvc - .perform(get("/subscriptions").param("query", encodedQuery)) - .andExpect(status().is4xxClientError) - } - - @Test - fun notAPublisherServerError() { - val query = "subscription { stocks { name, price }}" - val queryPayload = QueryPayload(operationName = "MySubscription", query = query) - val encodedQuery = Base64.getEncoder().encodeToString(mapper.writeValueAsBytes(queryPayload)) - - val executionResult = - ExecutionResultImpl - .newExecutionResult() - .data("not a publisher") - .build() - - `when`(dgsQueryExecutor.execute(eq(query), any())).thenReturn(executionResult) - - mockMvc - .perform(get("/subscriptions").param("query", encodedQuery)) - .andExpect(status().is5xxServerError) - } - - @Test - fun notAPublisherClientError() { - // Not a subscription query - val query = "query { stocks { name, price }}" - val queryPayload = QueryPayload(operationName = "MySubscription", query = query) - val encodedQuery = Base64.getEncoder().encodeToString(mapper.writeValueAsBytes(queryPayload)) - - val executionResult = - ExecutionResultImpl - .newExecutionResult() - .data(mapOf("stocks" to listOf(mapOf("name" to "VTI", "price" to 200)))) - .build() - - `when`(dgsQueryExecutor.execute(eq(query), any())).thenReturn(executionResult) - - mockMvc - .perform(get("/subscriptions").param("query", encodedQuery)) - .andExpect(status().is4xxClientError) - } - - @Test - fun success() { - val query = "subscription { stocks { name, price }}" - val queryPayload = QueryPayload(operationName = "MySubscription", query = query) - val encodedQuery = Base64.getEncoder().encodeToString(mapper.writeValueAsBytes(queryPayload)) - - val publisher = - Flux.just( - ExecutionResultImpl.newExecutionResult().data("message 1").build(), - ExecutionResultImpl.newExecutionResult().data("message 2").build(), - ) - val executionResult = - ExecutionResultImpl - .newExecutionResult() - .data(publisher) - .build() - - `when`(dgsQueryExecutor.execute(eq(query), any())).thenReturn(executionResult) - - val result = - mockMvc - .perform(get("/subscriptions").param("query", encodedQuery)) - .andExpect(request().asyncStarted()) - .andExpect(status().is2xxSuccessful) - .andReturn() - - mockMvc - .perform(asyncDispatch(result)) - .andExpect(content().contentType(MediaType.TEXT_EVENT_STREAM)) - .andReturn() - - val messages = - result.response.contentAsString - .lineSequence() - .filter { line -> line.startsWith("data:") } - .map { line -> line.substring("data:".length) } - .map { line -> mapper.readValue(line) } - .toList() - - assertEquals(2, messages.size) - assertEquals("message 1", messages[0].data) - assertEquals("message 2", messages[1].data) - } - - @Test - fun `success with Optional types`() { - val query = "subscription { stocks { name, price }}" - val queryPayload = QueryPayload(operationName = "MySubscription", query = query) - val encodedQuery = Base64.getEncoder().encodeToString(mapper.writeValueAsBytes(queryPayload)) - - val publisher = - Flux.just( - ExecutionResultImpl.newExecutionResult().data(Optional.of("optional message")).build(), - ExecutionResultImpl.newExecutionResult().data(Optional.empty()).build(), - ) - val executionResult = ExecutionResultImpl.newExecutionResult().data(publisher).build() - - `when`(dgsQueryExecutor.execute(eq(query), any())).thenReturn(executionResult) - - val result = - mockMvc - .perform(get("/subscriptions").param("query", encodedQuery)) - .andExpect(request().asyncStarted()) - .andExpect(status().is2xxSuccessful) - .andReturn() - - mockMvc - .perform(asyncDispatch(result)) - .andExpect(content().contentType(MediaType.TEXT_EVENT_STREAM)) - .andReturn() - - val messages = - result.response.contentAsString - .lineSequence() - .filter { line -> line.startsWith("data:") } - .map { line -> line.substring("data:".length) } - .map { line -> mapper.readValue(line) } - .toList() - - assertEquals(2, messages.size) - assertEquals("optional message", messages[0].data) - assertEquals(null, messages[1].data) - } -} diff --git a/graphql-dgs-subscriptions-websockets-autoconfigure/build.gradle.kts b/graphql-dgs-subscriptions-websockets-autoconfigure/build.gradle.kts deleted file mode 100644 index 1e53ba49b..000000000 --- a/graphql-dgs-subscriptions-websockets-autoconfigure/build.gradle.kts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -dependencies { - implementation(project(":graphql-dgs")) - implementation(project(":graphql-dgs-subscriptions-websockets")) - - implementation("org.springframework.boot:spring-boot-autoconfigure") - implementation("org.springframework:spring-websocket") - implementation("com.fasterxml.jackson.module:jackson-module-kotlin") - implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310") - - compileOnly("jakarta.annotation:jakarta.annotation-api") - - testImplementation("org.springframework.boot:spring-boot-starter-web") -} diff --git a/graphql-dgs-subscriptions-websockets-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/DgsWebSocketAutoConfig.kt b/graphql-dgs-subscriptions-websockets-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/DgsWebSocketAutoConfig.kt deleted file mode 100644 index 36bc9a830..000000000 --- a/graphql-dgs-subscriptions-websockets-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/DgsWebSocketAutoConfig.kt +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.subscriptions.websockets - -import com.fasterxml.jackson.databind.ObjectMapper -import com.netflix.graphql.dgs.DgsQueryExecutor -import org.springframework.beans.factory.annotation.Qualifier -import org.springframework.boot.autoconfigure.AutoConfiguration -import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication -import org.springframework.boot.context.properties.EnableConfigurationProperties -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration -import org.springframework.web.socket.WebSocketHandler -import org.springframework.web.socket.config.annotation.EnableWebSocket -import org.springframework.web.socket.config.annotation.WebSocketConfigurer -import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry -import org.springframework.web.socket.server.HandshakeInterceptor -import org.springframework.web.socket.server.support.DefaultHandshakeHandler - -@AutoConfiguration -@ConditionalOnWebApplication -@EnableConfigurationProperties(DgsWebSocketConfigurationProperties::class) -open class DgsWebSocketAutoConfig { - @Bean - open fun webSocketHandler( - @Suppress("SpringJavaInjectionPointsAutowiringInspection") dgsQueryExecutor: DgsQueryExecutor, - configProps: DgsWebSocketConfigurationProperties, - @Qualifier("dgsObjectMapper") objectMapper: ObjectMapper, - ): WebSocketHandler = - DgsWebSocketHandler(dgsQueryExecutor, configProps.connectionInitTimeout, configProps.subscriptionErrorLogLevel, objectMapper) - - @Configuration - @EnableWebSocket - internal open class WebSocketConfig( - @Suppress("SpringJavaInjectionPointsAutowiringInspection") private val webSocketHandler: WebSocketHandler, - private val handshakeInterceptor: HandshakeInterceptor, - private val configProps: DgsWebSocketConfigurationProperties, - ) : WebSocketConfigurer { - override fun registerWebSocketHandlers(registry: WebSocketHandlerRegistry) { - val handshakeHandler = DefaultHandshakeHandler() - registry - .addHandler(webSocketHandler, configProps.path) - .setHandshakeHandler(handshakeHandler) - .addInterceptors(handshakeInterceptor) - .setAllowedOrigins("*") - } - } - - @Bean - open fun handshakeInterceptor(): HandshakeInterceptor = DgsHandshakeInterceptor() -} diff --git a/graphql-dgs-subscriptions-websockets-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/DgsWebSocketConfigurationProperties.kt b/graphql-dgs-subscriptions-websockets-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/DgsWebSocketConfigurationProperties.kt deleted file mode 100644 index b70296c6e..000000000 --- a/graphql-dgs-subscriptions-websockets-autoconfigure/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/DgsWebSocketConfigurationProperties.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.subscriptions.websockets - -import jakarta.annotation.PostConstruct -import org.slf4j.event.Level -import org.springframework.boot.context.properties.ConfigurationProperties -import org.springframework.boot.context.properties.bind.DefaultValue -import java.time.Duration - -@ConfigurationProperties(prefix = "dgs.graphql.websocket") -@Suppress("ConfigurationProperties") -data class DgsWebSocketConfigurationProperties( - @DefaultValue("/subscriptions") var path: String = "/subscriptions", - /** Connection Initialization timeout. */ - @DefaultValue(CONNECTION_INIT_TIMEOUT) var connectionInitTimeout: Duration, - @DefaultValue("ERROR") var subscriptionErrorLogLevel: Level = Level.ERROR, -) { - @PostConstruct - fun validatePaths() { - validatePath(this.path, "dgs.graphql.websocket.path") - } - - private fun validatePath( - path: String, - pathProperty: String, - ) { - if (path != "/" && (!path.startsWith("/") || path.endsWith("/"))) { - throw IllegalArgumentException("$pathProperty must start with '/' and not end with '/' but was '$path'") - } - } - - companion object { - const val CONNECTION_INIT_TIMEOUT = "10s" - } -} diff --git a/graphql-dgs-subscriptions-websockets-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/graphql-dgs-subscriptions-websockets-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index 5c18a01da..000000000 --- a/graphql-dgs-subscriptions-websockets-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1 +0,0 @@ -com.netflix.graphql.dgs.subscriptions.websockets.DgsWebSocketAutoConfig diff --git a/graphql-dgs-subscriptions-websockets-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/autoconfigure/DgsWebSocketConfigurationPropertiesTest.kt b/graphql-dgs-subscriptions-websockets-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/autoconfigure/DgsWebSocketConfigurationPropertiesTest.kt deleted file mode 100644 index b4ea1cfc4..000000000 --- a/graphql-dgs-subscriptions-websockets-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/autoconfigure/DgsWebSocketConfigurationPropertiesTest.kt +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.subscriptions.websockets.autoconfigure - -import com.netflix.graphql.dgs.subscriptions.websockets.DgsWebSocketConfigurationProperties -import org.assertj.core.api.Assertions -import org.junit.jupiter.api.Test -import org.springframework.boot.context.properties.bind.Binder -import org.springframework.boot.context.properties.source.ConfigurationPropertySource -import org.springframework.boot.context.properties.source.MapConfigurationPropertySource -import java.util.* - -class DgsWebSocketConfigurationPropertiesTest { - @Test - fun websocketPathDefault() { - val properties = bind(Collections.emptyMap()) - Assertions.assertThat(properties.path).isEqualTo("/subscriptions") - } - - @Test - fun websocketPathCustom() { - val properties = bind("dgs.graphql.websocket.path", "/private/subscriptions") - Assertions.assertThat(properties.path).isEqualTo("/private/subscriptions") - } - - private fun bind( - name: String, - value: String, - ): DgsWebSocketConfigurationProperties = bind(Collections.singletonMap(name, value)) - - private fun bind(map: Map): DgsWebSocketConfigurationProperties { - val source: ConfigurationPropertySource = MapConfigurationPropertySource(map) - return Binder(source).bindOrCreate("dgs.graphql.websocket", DgsWebSocketConfigurationProperties::class.java) - } -} diff --git a/graphql-dgs-subscriptions-websockets-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/autoconfigure/DgsWebSocketConfigurationPropertiesValidationTest.kt b/graphql-dgs-subscriptions-websockets-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/autoconfigure/DgsWebSocketConfigurationPropertiesValidationTest.kt deleted file mode 100644 index 4c5084ae2..000000000 --- a/graphql-dgs-subscriptions-websockets-autoconfigure/src/test/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/autoconfigure/DgsWebSocketConfigurationPropertiesValidationTest.kt +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.subscriptions.websockets.autoconfigure - -import com.netflix.graphql.dgs.subscriptions.websockets.DgsWebSocketConfigurationProperties -import org.assertj.core.api.Assertions -import org.junit.jupiter.api.Test -import org.springframework.boot.autoconfigure.AutoConfigurations -import org.springframework.boot.context.properties.EnableConfigurationProperties -import org.springframework.boot.test.context.runner.ApplicationContextRunner -import org.springframework.context.annotation.Configuration - -class DgsWebSocketConfigurationPropertiesValidationTest { - private val context = - ApplicationContextRunner().withConfiguration( - AutoConfigurations.of( - MockConfigPropsAutoConfiguration::class.java, - ), - )!! - - @Test - fun webSocketValidCustomPath() { - context - .withPropertyValues("dgs.graphql.websocket.path: /pws") - .run { ctx -> - Assertions.assertThat(ctx).hasNotFailed() - } - } - - @Test - fun websocketInvalidCustomPathEndsWithSlash() { - context - .withPropertyValues("dgs.graphql.websocket.path: /pws/") - .run { ctx -> - Assertions - .assertThat(ctx) - .hasFailed() - .failure - .rootCause() - .hasMessageContaining("dgs.graphql.websocket.path must start with '/' and not end with '/'") - } - } - - @Configuration - @EnableConfigurationProperties(DgsWebSocketConfigurationProperties::class) - open class MockConfigPropsAutoConfiguration -} diff --git a/graphql-dgs-subscriptions-websockets/build.gradle.kts b/graphql-dgs-subscriptions-websockets/build.gradle.kts deleted file mode 100644 index 64918d655..000000000 --- a/graphql-dgs-subscriptions-websockets/build.gradle.kts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -dependencies { - api(project(":graphql-dgs-subscription-types")) - - implementation(project(":graphql-dgs")) - implementation("org.springframework.boot:spring-boot-autoconfigure") - implementation("org.springframework:spring-web") - implementation("org.springframework:spring-websocket") - implementation("com.fasterxml.jackson.module:jackson-module-kotlin") - - compileOnly("jakarta.annotation:jakarta.annotation-api") - compileOnly("org.springframework.security:spring-security-core") - - testImplementation("io.projectreactor:reactor-core") - testImplementation("io.projectreactor.kotlin:reactor-kotlin-extensions") -} diff --git a/graphql-dgs-subscriptions-websockets/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/Context.kt b/graphql-dgs-subscriptions-websockets/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/Context.kt deleted file mode 100644 index a27f84d4b..000000000 --- a/graphql-dgs-subscriptions-websockets/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/Context.kt +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.subscriptions.websockets - -import org.reactivestreams.Subscription -import java.util.concurrent.ConcurrentHashMap - -internal class Context( - /** - * Indicates that the `ConnectionInit` message - * has been received by the server. If this is - * `true`, the client wont be kicked off after - * the wait timeout has passed. - */ - private var connectionInitReceived: Boolean = false, -) { - /** - * Indicates that the connection was acknowledged - * by having dispatched the `ConnectionAck` message - * to the related client. - */ - var acknowledged: Boolean = false - - /** The parameters passed during the connection initialisation. */ - var connectionParams: Map? = null - - /** - * Holds the active subscriptions for this context. **All operations** - * that are taking place are aggregated here. The user is _subscribed_ - * to an operation when waiting for result(s). - */ - val subscriptions = ConcurrentHashMap() - - /** - * An extra field where you can store your own context values - * to pass between callbacks. - */ - var extra: T? = null - - @Synchronized - fun setConnectionInitReceived(): Boolean { - val previousValue: Boolean = this.connectionInitReceived - this.connectionInitReceived = true - return previousValue - } - - @Synchronized - fun getConnectionInitReceived(): Boolean = this.connectionInitReceived -} diff --git a/graphql-dgs-subscriptions-websockets/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/DgsHandshakeInterceptor.kt b/graphql-dgs-subscriptions-websockets/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/DgsHandshakeInterceptor.kt deleted file mode 100644 index c6547f4b3..000000000 --- a/graphql-dgs-subscriptions-websockets/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/DgsHandshakeInterceptor.kt +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.subscriptions.websockets - -import com.netflix.graphql.types.subscription.GRAPHQL_SUBSCRIPTIONS_TRANSPORT_WS_PROTOCOL -import com.netflix.graphql.types.subscription.GRAPHQL_SUBSCRIPTIONS_WS_PROTOCOL -import org.slf4j.LoggerFactory -import org.springframework.http.server.ServerHttpRequest -import org.springframework.http.server.ServerHttpResponse -import org.springframework.web.socket.WebSocketHandler -import org.springframework.web.socket.WebSocketHttpHeaders -import org.springframework.web.socket.server.support.HttpSessionHandshakeInterceptor -import java.lang.Exception - -class DgsHandshakeInterceptor : HttpSessionHandshakeInterceptor() { - private val logger = LoggerFactory.getLogger(DgsHandshakeInterceptor::class.java) - - override fun beforeHandshake( - request: ServerHttpRequest, - response: ServerHttpResponse, - wsHandler: WebSocketHandler, - attributes: MutableMap, - ): Boolean { - if (request.headers[WebSocketHttpHeaders.SEC_WEBSOCKET_PROTOCOL].isNullOrEmpty()) { - request.headers.set(WebSocketHttpHeaders.SEC_WEBSOCKET_PROTOCOL, GRAPHQL_SUBSCRIPTIONS_WS_PROTOCOL) - request.headers.set(WebSocketHttpHeaders.SEC_WEBSOCKET_PROTOCOL, GRAPHQL_SUBSCRIPTIONS_TRANSPORT_WS_PROTOCOL) - } - return super.beforeHandshake(request, response, wsHandler, attributes) - } - - override fun afterHandshake( - request: ServerHttpRequest, - response: ServerHttpResponse, - wsHandler: WebSocketHandler, - exception: Exception?, - ) { - } -} diff --git a/graphql-dgs-subscriptions-websockets/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/DgsWebSocketHandler.kt b/graphql-dgs-subscriptions-websockets/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/DgsWebSocketHandler.kt deleted file mode 100644 index 08c90da69..000000000 --- a/graphql-dgs-subscriptions-websockets/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/DgsWebSocketHandler.kt +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.subscriptions.websockets - -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.types.subscription.* -import jakarta.annotation.PostConstruct -import jakarta.annotation.PreDestroy -import org.slf4j.Logger -import org.slf4j.LoggerFactory -import org.slf4j.event.Level -import org.springframework.security.core.context.SecurityContext -import org.springframework.security.core.context.SecurityContextHolder -import org.springframework.util.ClassUtils -import org.springframework.web.socket.CloseStatus -import org.springframework.web.socket.SubProtocolCapable -import org.springframework.web.socket.TextMessage -import org.springframework.web.socket.WebSocketSession -import org.springframework.web.socket.handler.TextWebSocketHandler -import java.time.Duration - -class DgsWebSocketHandler( - dgsQueryExecutor: DgsQueryExecutor, - connectionInitTimeout: Duration, - subscriptionErrorLogLevel: Level, - objectMapper: ObjectMapper = jacksonObjectMapper(), -) : TextWebSocketHandler(), - SubProtocolCapable { - private val graphqlWSHandler = WebsocketGraphQLWSProtocolHandler(dgsQueryExecutor, subscriptionErrorLogLevel, objectMapper) - private val graphqlTransportWSHandler = - WebsocketGraphQLTransportWSProtocolHandler(dgsQueryExecutor, connectionInitTimeout, subscriptionErrorLogLevel, objectMapper) - - @PostConstruct - fun setupCleanup() { - try { - graphqlWSHandler.setupCleanup() - } catch (e: Exception) { - logger.error("Error setting up cleanup subscriptions tasks") - } - try { - graphqlTransportWSHandler.setupCleanup() - } catch (e: Exception) { - logger.error("Error setting up cleanup subscriptions tasks") - } - } - - @PreDestroy - fun destroy() { - try { - graphqlWSHandler.destroy() - } catch (exc: Exception) { - logger.warn("Error calling destroy method on {}", graphqlWSHandler, exc) - } - try { - graphqlTransportWSHandler.destroy() - } catch (exc: Exception) { - logger.warn("Error calling destroy method on {}", graphqlTransportWSHandler, exc) - } - } - - override fun afterConnectionEstablished(session: WebSocketSession) { - try { - graphqlWSHandler.afterConnectionEstablished(session) - } catch (e: Exception) { - logger.error("Unable to handle connection established for {}", session.id) - } - - try { - graphqlTransportWSHandler.afterConnectionEstablished(session) - } catch (e: Exception) { - logger.error("Unable to handle connection established for {}", session.id) - } - } - - override fun afterConnectionClosed( - session: WebSocketSession, - status: CloseStatus, - ) { - try { - graphqlWSHandler.afterConnectionClosed(session, status) - } catch (e: Exception) { - logger.error("Error closing connection for session {}", session.id) - } - - try { - graphqlTransportWSHandler.afterConnectionClosed(session, status) - } catch (e: Exception) { - logger.error("Error closing connection for session {}", session.id) - } - } - - public override fun handleTextMessage( - session: WebSocketSession, - message: TextMessage, - ) { - loadSecurityContextFromSession(session) - if (session.acceptedProtocol.equals(GRAPHQL_SUBSCRIPTIONS_WS_PROTOCOL, ignoreCase = true)) { - return graphqlWSHandler.handleTextMessage(session, message) - } else if (session.acceptedProtocol.equals(GRAPHQL_SUBSCRIPTIONS_TRANSPORT_WS_PROTOCOL, ignoreCase = true)) { - return graphqlTransportWSHandler.handleTextMessage(session, message) - } - } - - private fun loadSecurityContextFromSession(session: WebSocketSession) { - if (springSecurityAvailable) { - val securityContext = session.attributes["SPRING_SECURITY_CONTEXT"] as? SecurityContext - if (securityContext != null) { - SecurityContextHolder.setContext(securityContext) - } - } - } - - override fun getSubProtocols(): List = listOf(GRAPHQL_SUBSCRIPTIONS_WS_PROTOCOL, GRAPHQL_SUBSCRIPTIONS_TRANSPORT_WS_PROTOCOL) - - private companion object { - val logger: Logger = LoggerFactory.getLogger(DgsWebSocketHandler::class.java) - - private val springSecurityAvailable: Boolean = - ClassUtils.isPresent( - "org.springframework.security.core.context.SecurityContextHolder", - DgsWebSocketHandler::class.java.classLoader, - ) - } -} diff --git a/graphql-dgs-subscriptions-websockets/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/WebsocketGraphQLTransportWSProtocolHandler.kt b/graphql-dgs-subscriptions-websockets/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/WebsocketGraphQLTransportWSProtocolHandler.kt deleted file mode 100644 index fd255b6a9..000000000 --- a/graphql-dgs-subscriptions-websockets/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/WebsocketGraphQLTransportWSProtocolHandler.kt +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.subscriptions.websockets - -import com.fasterxml.jackson.databind.ObjectMapper -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.types.subscription.websockets.CloseCode -import com.netflix.graphql.types.subscription.websockets.Message -import graphql.ExecutionResult -import graphql.GraphqlErrorBuilder -import jakarta.annotation.PostConstruct -import jakarta.annotation.PreDestroy -import org.reactivestreams.Publisher -import org.reactivestreams.Subscriber -import org.reactivestreams.Subscription -import org.slf4j.Logger -import org.slf4j.LoggerFactory -import org.slf4j.event.Level -import org.springframework.web.socket.CloseStatus -import org.springframework.web.socket.TextMessage -import org.springframework.web.socket.WebSocketSession -import org.springframework.web.socket.handler.TextWebSocketHandler -import java.time.Duration -import java.util.* -import java.util.concurrent.ConcurrentHashMap -import java.util.concurrent.CopyOnWriteArrayList - -/** - * WebSocketHandler for GraphQL based on - * GraphQL Over WebSocket Protocol and - * for use in DGS framework. - */ -class WebsocketGraphQLTransportWSProtocolHandler( - private val dgsQueryExecutor: DgsQueryExecutor, - private val connectionInitTimeout: Duration, - private val subscriptionErrorLogLevel: Level, - private val objectMapper: ObjectMapper, -) : TextWebSocketHandler() { - internal val sessions = CopyOnWriteArrayList() - internal val contexts = ConcurrentHashMap>() - - @Volatile - private var timer: Timer? = null - - @PostConstruct - fun setupCleanup() { - val timer = Timer("dgs-graphql-ws-transport-session-cleanup", true) - this.timer = timer - - val timerTask = - object : TimerTask() { - override fun run() { - for (session in sessions) { - if (!session.isOpen) { - cleanupSubscriptionsForSession(session) - } - } - } - } - timer.scheduleAtFixedRate(timerTask, 0, 5000) - } - - @PreDestroy - fun destroy() { - val timer = this.timer ?: return - timer.cancel() - this.timer = null - } - - override fun afterConnectionEstablished(session: WebSocketSession) { - val context = Context() - contexts[session.id] = context - val timer = Timer("dgs-graphql-ws-transport-connection-timeout-watchdog-${session.id}", true) - - val timerTask = - object : TimerTask() { - override fun run() { - if (!context.getConnectionInitReceived()) { - session.close(CloseStatus(CloseCode.ConnectionInitialisationTimeout.code)) - contexts.remove(session.id) - } - timer.cancel() - } - } - - timer.schedule(timerTask, connectionInitTimeout.toMillis()) - } - - override fun afterConnectionClosed( - session: WebSocketSession, - status: CloseStatus, - ) { - if (status == CloseStatus.NORMAL) { - cleanupSubscriptionsForSession(session) - } - } - - public override fun handleTextMessage( - session: WebSocketSession, - textMessage: TextMessage, - ) { - val message = objectMapper.readValue(textMessage.payload, Message::class.java) - val context = contexts[session.id]!! - - when (message) { - is Message.ConnectionInitMessage -> { - logger.info("Initialized connection for {}", session.id) - if (context.setConnectionInitReceived()) { - return session.close(CloseStatus(CloseCode.BadRequest.code, "Too many initialisation requests")) - } - sessions.add(session) - - context.connectionParams = message.payload - try { - session.sendMessage( - TextMessage( - objectMapper.writeValueAsBytes( - Message.ConnectionAckMessage(), - ), - ), - ) - context.acknowledged = true - } catch (e: Throwable) { - session.close(CloseStatus(CloseCode.Forbidden.code, "Forbidden")) - } - } - is Message.PingMessage -> { - session.sendMessage( - TextMessage( - objectMapper.writeValueAsBytes( - Message.PongMessage( - payload = message.payload, - ), - ), - ), - ) - } - is Message.PongMessage -> { - } - is Message.SubscribeMessage -> { - if (!context.acknowledged) { - return session.close(CloseStatus(CloseCode.Unauthorized.code, "Unauthorized")) - } - val (id, payload) = message - if (context.subscriptions.contains(id)) { - return session.close(CloseStatus(CloseCode.SubscriberAlreadyExists.code, "Subscriber for $id already exists")) - } - - handleSubscription(id, payload, session) - } - is Message.CompleteMessage -> { - logger.info("Complete subscription for " + message.id) - val subscription = context.subscriptions.remove(message.id) - subscription?.cancel() - } - else -> session.close(CloseStatus(CloseCode.BadRequest.code, "Unexpected message format")) - } - } - - private fun cleanupSubscriptionsForSession(session: WebSocketSession) { - logger.info("Cleaning up for session {}", session.id) - contexts[session.id]?.subscriptions?.values?.forEach { it.cancel() } - contexts.remove(session.id) - sessions.remove(session) - } - - private fun handleSubscription( - id: String, - payload: Message.SubscribeMessage.Payload, - session: WebSocketSession, - ) { - val executionResult: ExecutionResult = - dgsQueryExecutor.execute( - payload.query, - payload.variables.orEmpty(), - payload.extensions, - null, - payload.operationName, - null, - ) - - val subscriptionStream: Publisher = executionResult.getData() - - subscriptionStream.subscribe( - object : Subscriber { - override fun onSubscribe(s: Subscription) { - logger.info("Subscription started for {}", id) - contexts[session.id]?.subscriptions?.set(id, s) - - s.request(1) - } - - override fun onNext(er: ExecutionResult) { - val message = - Message.NextMessage( - payload = - com.netflix.graphql.types.subscription.websockets - .ExecutionResult(er.getData(), er.errors), - id = id, - ) - val jsonMessage = TextMessage(objectMapper.writeValueAsBytes(message)) - logger.debug("Sending subscription data: {}", jsonMessage) - - if (session.isOpen) { - session.sendMessage(jsonMessage) - contexts[session.id]?.subscriptions?.get(id)?.request(1) - } - } - - override fun onError(t: Throwable) { - when (subscriptionErrorLogLevel) { - Level.ERROR -> logger.error("Error on subscription {}", id, t) - Level.WARN -> logger.warn("Error on subscription {}", id, t) - Level.INFO -> logger.info("Error on subscription {}: {}", id, t.message) - Level.DEBUG -> logger.debug("Error on subscription {}", id, t) - Level.TRACE -> logger.trace("Error on subscription {}", id, t) - } - val message = - Message.ErrorMessage( - id = id, - payload = listOf(GraphqlErrorBuilder.newError().message(t.message).build()), - ) - val jsonMessage = TextMessage(objectMapper.writeValueAsBytes(message)) - logger.debug("Sending subscription error: {}", jsonMessage) - - if (session.isOpen) { - session.sendMessage(jsonMessage) - } - } - - override fun onComplete() { - logger.info("Subscription completed for {}", id) - val message = Message.CompleteMessage(id) - val jsonMessage = TextMessage(objectMapper.writeValueAsBytes(message)) - - if (session.isOpen) { - session.sendMessage(jsonMessage) - } - contexts[session.id]?.subscriptions?.remove(id) - } - }, - ) - } - - private companion object { - val logger: Logger = LoggerFactory.getLogger(WebsocketGraphQLTransportWSProtocolHandler::class.java) - } -} diff --git a/graphql-dgs-subscriptions-websockets/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/WebsocketGraphQLWSProtocolHandler.kt b/graphql-dgs-subscriptions-websockets/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/WebsocketGraphQLWSProtocolHandler.kt deleted file mode 100644 index 3ded9868b..000000000 --- a/graphql-dgs-subscriptions-websockets/src/main/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/WebsocketGraphQLWSProtocolHandler.kt +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.subscriptions.websockets - -import com.fasterxml.jackson.core.JsonProcessingException -import com.fasterxml.jackson.databind.ObjectMapper -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.types.subscription.* -import graphql.ExecutionResult -import jakarta.annotation.PostConstruct -import jakarta.annotation.PreDestroy -import org.reactivestreams.Publisher -import org.reactivestreams.Subscriber -import org.reactivestreams.Subscription -import org.slf4j.Logger -import org.slf4j.LoggerFactory -import org.slf4j.event.Level -import org.springframework.web.socket.TextMessage -import org.springframework.web.socket.WebSocketSession -import org.springframework.web.socket.handler.TextWebSocketHandler -import java.io.UncheckedIOException -import java.util.* -import java.util.concurrent.ConcurrentHashMap -import java.util.concurrent.CopyOnWriteArrayList - -class WebsocketGraphQLWSProtocolHandler( - private val dgsQueryExecutor: DgsQueryExecutor, - private val subscriptionErrorLogLevel: Level, - private val objectMapper: ObjectMapper, -) : TextWebSocketHandler() { - internal val subscriptions = ConcurrentHashMap>() - internal val sessions = CopyOnWriteArrayList() - - @Volatile - private var timer: Timer? = null - - @PostConstruct - fun setupCleanup() { - val timer = Timer("dgs-graphql-ws-session-cleanup", true) - this.timer = timer - val timerTask = - object : TimerTask() { - override fun run() { - for (session in sessions) { - if (!session.isOpen) { - cleanupSubscriptionsForSession(session) - } - } - } - } - timer.scheduleAtFixedRate(timerTask, 0, 5000) - } - - @PreDestroy - fun destroy() { - val timer = this.timer ?: return - timer.cancel() - this.timer = null - } - - public override fun handleTextMessage( - session: WebSocketSession, - message: TextMessage, - ) { - val (type, payload, id) = objectMapper.readValue(message.payload, OperationMessage::class.java) - when (type) { - GQL_CONNECTION_INIT -> { - logger.info("Initialized connection for {}", session.id) - sessions.add(session) - session.sendMessage( - TextMessage( - objectMapper.writeValueAsBytes( - OperationMessage( - GQL_CONNECTION_ACK, - ), - ), - ), - ) - } - GQL_START -> { - val queryPayload = objectMapper.convertValue(payload, QueryPayload::class.java) - handleSubscription(id!!, queryPayload, session) - } - GQL_STOP -> { - subscriptions[session.id]?.get(id)?.cancel() - subscriptions[session.id]?.remove(id) - } - GQL_CONNECTION_TERMINATE -> { - logger.info("Terminated session {}", session.id) - cleanupSubscriptionsForSession(session) - session.close() - } - else -> session.sendMessage(TextMessage(objectMapper.writeValueAsBytes(OperationMessage("error")))) - } - } - - private fun cleanupSubscriptionsForSession(session: WebSocketSession) { - logger.info("Cleaning up for session {}", session.id) - subscriptions[session.id]?.values?.forEach { it.cancel() } - subscriptions.remove(session.id) - sessions.remove(session) - } - - private fun handleSubscription( - id: String, - payload: QueryPayload, - session: WebSocketSession, - ) { - val executionResult: ExecutionResult = dgsQueryExecutor.execute(payload.query, payload.variables.orEmpty()) - val subscriptionStream: Publisher = executionResult.getData() - - subscriptionStream.subscribe( - object : Subscriber { - override fun onSubscribe(s: Subscription) { - logger.info("Subscription started for {}", id) - subscriptions.putIfAbsent(session.id, mutableMapOf()) - subscriptions[session.id]?.set(id, s) - - s.request(1) - } - - override fun onNext(er: ExecutionResult) { - val message = OperationMessage(GQL_DATA, DataPayload(er.getData(), er.errors), id) - val jsonMessage = - try { - TextMessage(objectMapper.writeValueAsBytes(message)) - } catch (exc: JsonProcessingException) { - throw UncheckedIOException(exc) - } - logger.debug("Sending subscription data: {}", jsonMessage) - - if (session.isOpen) { - session.sendMessage(jsonMessage) - subscriptions[session.id]?.get(id)?.request(1) - } - } - - override fun onError(t: Throwable) { - when (subscriptionErrorLogLevel) { - Level.ERROR -> logger.error("Error on subscription {}", id, t) - Level.WARN -> logger.warn("Error on subscription {}", id, t) - Level.INFO -> logger.info("Error on subscription {}: {}", id, t.message) - Level.DEBUG -> logger.debug("Error on subscription {}", id, t) - Level.TRACE -> logger.trace("Error on subscription {}", id, t) - } - val message = OperationMessage(GQL_ERROR, DataPayload(null, listOf(t.message!!)), id) - val jsonMessage = TextMessage(objectMapper.writeValueAsBytes(message)) - logger.debug("Sending subscription error: {}", jsonMessage) - - if (session.isOpen) { - session.sendMessage(jsonMessage) - } - } - - override fun onComplete() { - logger.info("Subscription completed for {}", id) - val message = OperationMessage(GQL_COMPLETE, null, id) - val jsonMessage = TextMessage(objectMapper.writeValueAsBytes(message)) - - if (session.isOpen) { - session.sendMessage(jsonMessage) - } - - subscriptions[session.id]?.remove(id) - } - }, - ) - } - - private companion object { - val logger: Logger = LoggerFactory.getLogger(WebsocketGraphQLWSProtocolHandler::class.java) - } -} diff --git a/graphql-dgs-subscriptions-websockets/src/test/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/WebsocketGraphQLTransportWSProtocolHandlerTest.kt b/graphql-dgs-subscriptions-websockets/src/test/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/WebsocketGraphQLTransportWSProtocolHandlerTest.kt deleted file mode 100644 index f695ce1b8..000000000 --- a/graphql-dgs-subscriptions-websockets/src/test/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/WebsocketGraphQLTransportWSProtocolHandlerTest.kt +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright 2022 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.subscriptions.websockets - -import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper -import com.fasterxml.jackson.module.kotlin.readValue -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.types.subscription.websockets.CloseCode -import com.netflix.graphql.types.subscription.websockets.Message -import com.netflix.graphql.types.subscription.websockets.MessageType -import graphql.ExecutionResult -import io.mockk.Runs -import io.mockk.every -import io.mockk.impl.annotations.MockK -import io.mockk.junit5.MockKExtension -import io.mockk.just -import io.mockk.mockkClass -import io.mockk.slot -import io.mockk.verify -import org.assertj.core.api.Assertions -import org.junit.jupiter.api.BeforeEach -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.extension.ExtendWith -import org.reactivestreams.Publisher -import org.slf4j.event.Level -import org.springframework.web.socket.CloseStatus -import org.springframework.web.socket.TextMessage -import org.springframework.web.socket.WebSocketSession -import reactor.core.publisher.Flux -import reactor.core.publisher.Mono -import java.time.Duration - -@ExtendWith(MockKExtension::class) -class WebsocketGraphQLTransportWSProtocolHandlerTest { - private val objectMapper = jacksonObjectMapper() - private lateinit var dgsWebsocketHandler: WebsocketGraphQLTransportWSProtocolHandler - - @BeforeEach - fun setup() { - dgsWebsocketHandler = - WebsocketGraphQLTransportWSProtocolHandler(dgsQueryExecutor, Duration.ofMillis(1000), Level.ERROR, objectMapper) - - every { session1.id } returns "1" - every { session2.id } returns "2" - } - - @MockK - lateinit var dgsQueryExecutor: DgsQueryExecutor - - @MockK - lateinit var session1: WebSocketSession - - @MockK - lateinit var session2: WebSocketSession - - @MockK - lateinit var executionResult: ExecutionResult - - private fun queryMessage(session: WebSocketSession) = - TextMessage( - """ - { - "type": "${MessageType.SUBSCRIBE}", - "payload": { - "query": "{ hello }", - "variables": {}, - "extensions": {} - }, - "id": "${session.id}" - } - """.trimIndent(), - ) - - private val connectionInitMessage = - TextMessage( - """ - { - "type": "${MessageType.CONNECTION_INIT}", - "payload": { - "auth": "test" - } - } - """.trimIndent(), - ) - - @Test - fun query() { - connect(session1) - subscribe(session1, 3) - } - - @Test - fun testMultipleClients() { - connect(session1) - connect(session2) - subscribe(session2, 3) - subscribe(session1, 1) - - disconnect(session2) - disconnect(session1) - - // ACK, NEXT, COMPLETE - verify(exactly = 3) { - session1.sendMessage(any()) - } - - // ACK, NEXT, NEXT, NEXT, COMPLETE - verify(exactly = 5) { - session2.sendMessage(any()) - } - } - - @Test - fun testConnectionInitTimeout() { - every { session1.close(CloseStatus(CloseCode.ConnectionInitialisationTimeout.code, null)) } just Runs - - dgsWebsocketHandler.afterConnectionEstablished(session1) - Thread.sleep(12000) - verify { session1.close(CloseStatus(CloseCode.ConnectionInitialisationTimeout.code)) } - } - - private fun handle(vararg textMessages: TextMessage) { - dgsWebsocketHandler.afterConnectionEstablished(this.session1) - for (message in textMessages) { - dgsWebsocketHandler.handleTextMessage(this.session1, message) - } - } - - private fun connect(webSocketSession: WebSocketSession) { - val currentNrOfSessions = dgsWebsocketHandler.sessions.size - - val slot = slot() - every { webSocketSession.sendMessage(capture(slot)) } just Runs - - val textMessage = - TextMessage( - """ - { - "type": "${MessageType.CONNECTION_INIT}" - } - """.trimIndent(), - ) - - dgsWebsocketHandler.afterConnectionEstablished(webSocketSession) - dgsWebsocketHandler.handleTextMessage(webSocketSession, textMessage) - - Assertions.assertThat(dgsWebsocketHandler.sessions.size).isEqualTo(currentNrOfSessions + 1) - - val returnMessage = jacksonObjectMapper().readValue(slot.captured.asBytes()) - Assertions.assertThat(returnMessage.type).isEqualTo(MessageType.CONNECTION_ACK) - } - - private fun disconnect(webSocketSession: WebSocketSession) { - val currentNrOfSessions = dgsWebsocketHandler.sessions.size - // every { webSocketSession.close(CloseStatus.NORMAL) } just Runs - - dgsWebsocketHandler.afterConnectionClosed(webSocketSession, CloseStatus.NORMAL) - - Assertions.assertThat(dgsWebsocketHandler.sessions.size).isEqualTo(currentNrOfSessions - 1) - } - - private fun subscribe( - webSocketSession: WebSocketSession, - nrOfResults: Int, - ) { - every { webSocketSession.isOpen } returns true - - val results = - (1..nrOfResults).map { - val result1 = mockkClass(ExecutionResult::class) - every { result1.getData() } returns it - every { result1.extensions } returns mapOf() - every { result1.errors } returns listOf() - every { result1.isDataPresent } returns true - result1 - } - - every { executionResult.getData>() } returns - Mono.just(results).flatMapMany { Flux.fromIterable(results) } - - every { - dgsQueryExecutor.execute( - "{ hello }", - emptyMap(), - emptyMap(), - null, - null, - null, - ) - } returns executionResult - - dgsWebsocketHandler.handleTextMessage(webSocketSession, queryMessage(webSocketSession)) - } -} diff --git a/graphql-dgs-subscriptions-websockets/src/test/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/WebsocketGraphQLWSProtocolHandlerTest.kt b/graphql-dgs-subscriptions-websockets/src/test/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/WebsocketGraphQLWSProtocolHandlerTest.kt deleted file mode 100644 index 83e6d5fc9..000000000 --- a/graphql-dgs-subscriptions-websockets/src/test/kotlin/com/netflix/graphql/dgs/subscriptions/websockets/WebsocketGraphQLWSProtocolHandlerTest.kt +++ /dev/null @@ -1,401 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.subscriptions.websockets - -import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper -import com.fasterxml.jackson.module.kotlin.readValue -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.types.subscription.DataPayload -import com.netflix.graphql.types.subscription.GQL_CONNECTION_ACK -import com.netflix.graphql.types.subscription.GQL_CONNECTION_INIT -import com.netflix.graphql.types.subscription.GQL_CONNECTION_TERMINATE -import com.netflix.graphql.types.subscription.GQL_DATA -import com.netflix.graphql.types.subscription.GQL_ERROR -import com.netflix.graphql.types.subscription.GQL_START -import com.netflix.graphql.types.subscription.GQL_STOP -import com.netflix.graphql.types.subscription.OperationMessage -import graphql.ExceptionWhileDataFetching -import graphql.ExecutionResult -import graphql.execution.ResultPath -import io.mockk.Runs -import io.mockk.every -import io.mockk.impl.annotations.MockK -import io.mockk.junit5.MockKExtension -import io.mockk.just -import io.mockk.mockkClass -import io.mockk.slot -import io.mockk.verify -import org.assertj.core.api.Assertions.assertThat -import org.assertj.core.api.InstanceOfAssertFactories.MAP -import org.junit.jupiter.api.BeforeEach -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.extension.ExtendWith -import org.reactivestreams.Publisher -import org.slf4j.event.Level -import org.springframework.web.socket.TextMessage -import org.springframework.web.socket.WebSocketSession -import reactor.core.publisher.Flux -import reactor.core.publisher.Mono - -@ExtendWith(MockKExtension::class) -class WebsocketGraphQLWSProtocolHandlerTest { - private val objectMapper = jacksonObjectMapper() - private lateinit var dgsWebsocketHandler: WebsocketGraphQLWSProtocolHandler - - @BeforeEach - fun setup() { - dgsWebsocketHandler = WebsocketGraphQLWSProtocolHandler(dgsQueryExecutor, Level.ERROR, objectMapper) - - every { session1.id } returns "1" - every { session2.id } returns "2" - } - - @MockK - lateinit var dgsQueryExecutor: DgsQueryExecutor - - @MockK - lateinit var session1: WebSocketSession - - @MockK - lateinit var session2: WebSocketSession - - @MockK - lateinit var executionResult: ExecutionResult - - private val queryMessage = - TextMessage( - """ - { - "type": "$GQL_START", - "payload": { - "query": "{ hello }", - "variables": {}, - "extensions": {} - }, - "id": "123" - } - """.trimIndent(), - ) - - private val queryMessageWithVariable = - TextMessage( - """ - { - "type": "$GQL_START", - "payload": { - "query": "query HELLO(${'$'}name: String){ hello(name:${'$'}name) }", - "variables": {"name": "Stranger"}, - "extensions": {} - }, - "id": "222" - } - """.trimIndent(), - ) - - private val queryMessageWithNullVariable = - TextMessage( - """ - { - "type": "$GQL_START", - "payload": { - "query": "query HELLO(${'$'}name: String){ hello(name:${'$'}name) }", - "variables": null, - "extensions": {} - }, - "id": "123" - } - """.trimIndent(), - ) - - @Test - fun testMultipleClients() { - connect(session1) - connect(session2) - start(session2, 3) - start(session1, 1) - - disconnect(session2) - disconnect(session1) - - // ACK, DATA, COMPLETE - verify(exactly = 3) { - session1.sendMessage(any()) - } - - // ACK, DATA, DATA DATA, COMPLETE - verify(exactly = 5) { - session2.sendMessage(any()) - } - } - - @Test - fun testWithMultipleSubscriptionsPerSession() { - connect(session1) - start(session1, 1) - startWithVariable(session1, 1) - - assertThat(dgsWebsocketHandler.sessions.size).isEqualTo(1) - assertThat(dgsWebsocketHandler.subscriptions.size).isEqualTo(1) - disconnect(session1) - assertThat(dgsWebsocketHandler.sessions.size).isEqualTo(0) - } - - @Test - fun testWithQueryVariables() { - connect(session1) - startWithVariable(session1, 1) - - disconnect(session1) - - // ACK, DATA, COMPLETE - verify(exactly = 3) { - session1.sendMessage(any()) - } - } - - @Test - fun testWithNullQueryVariables() { - connect(session1) - startWithNullVariable(session1, 1) - - disconnect(session1) - - // ACK, DATA, COMPLETE - verify(exactly = 3) { - session1.sendMessage(any()) - } - } - - @Test - fun testWithError() { - connect(session1) - startWithError(session1) - disconnect(session1) - - // ACK, ERROR - verify(exactly = 2) { - session1.sendMessage(any()) - } - } - - @Test - fun testWithErrorAfterData() { - connect(session1) - nextWithError(session1, 2) - disconnect(session1) - - // ACK, ERROR - verify(exactly = 4) { - session1.sendMessage(any()) - } - } - - @Test - fun testWithStop() { - connect(session1) - start(session1, 1) - stop(session1) - disconnect(session1) - - // ACK, DATA, COMPLETE - verify(exactly = 3) { - session1.sendMessage(any()) - } - } - - private fun connect(webSocketSession: WebSocketSession) { - val currentNrOfSessions = dgsWebsocketHandler.sessions.size - - val slot = slot() - every { webSocketSession.sendMessage(capture(slot)) } just Runs - - val textMessage = - TextMessage( - """ - { - "type": "$GQL_CONNECTION_INIT" - } - """.trimIndent(), - ) - - dgsWebsocketHandler.handleTextMessage(webSocketSession, textMessage) - - assertThat(dgsWebsocketHandler.sessions.size).isEqualTo(currentNrOfSessions + 1) - - val returnMessage = objectMapper.readValue(slot.captured.asBytes()) - assertThat(returnMessage.type).isEqualTo(GQL_CONNECTION_ACK) - } - - private fun disconnect(webSocketSession: WebSocketSession) { - val currentNrOfSessions = dgsWebsocketHandler.sessions.size - every { webSocketSession.close() } just Runs - - val textMessage = - TextMessage( - """ - { - "type": "$GQL_CONNECTION_TERMINATE" - } - """.trimIndent(), - ) - - dgsWebsocketHandler.handleTextMessage(webSocketSession, textMessage) - - assertThat(dgsWebsocketHandler.sessions.size).isEqualTo(currentNrOfSessions - 1) - - verify { webSocketSession.close() } - } - - private fun start( - webSocketSession: WebSocketSession, - nrOfResults: Int, - ) { - every { webSocketSession.isOpen } returns true - - val results = - (1..nrOfResults).map { - val result1 = mockkClass(ExecutionResult::class) - every { result1.getData() } returns it - every { result1.errors } returns emptyList() - result1 - } - - every { executionResult.getData>() } returns - Mono.just(results).flatMapMany { Flux.fromIterable(results) } - - every { dgsQueryExecutor.execute("{ hello }", emptyMap()) } returns executionResult - - dgsWebsocketHandler.handleTextMessage(webSocketSession, queryMessage) - } - - private fun startWithVariable( - webSocketSession: WebSocketSession, - nrOfResults: Int, - ) { - every { webSocketSession.isOpen } returns true - - val results = - (1..nrOfResults).map { - val result1 = mockkClass(ExecutionResult::class) - every { result1.getData() } returns it - every { result1.errors } returns emptyList() - result1 - } - - every { executionResult.getData>() } returns - Mono.just(results).flatMapMany { Flux.fromIterable(results) } - - every { dgsQueryExecutor.execute("query HELLO(\$name: String){ hello(name:\$name) }", mapOf("name" to "Stranger")) } returns - executionResult - - dgsWebsocketHandler.handleTextMessage(webSocketSession, queryMessageWithVariable) - } - - private fun startWithNullVariable( - webSocketSession: WebSocketSession, - nrOfResults: Int, - ) { - every { webSocketSession.isOpen } returns true - - val results = - (1..nrOfResults).map { - val result1 = mockkClass(ExecutionResult::class) - every { result1.getData() } returns it - every { result1.errors } returns emptyList() - result1 - } - - every { executionResult.getData>() } returns - Mono.just(results).flatMapMany { Flux.fromIterable(results) } - - every { dgsQueryExecutor.execute("query HELLO(\$name: String){ hello(name:\$name) }", emptyMap()) } returns executionResult - - dgsWebsocketHandler.handleTextMessage(webSocketSession, queryMessageWithNullVariable) - } - - private fun startWithError(webSocketSession: WebSocketSession) { - every { webSocketSession.isOpen } returns true - every { executionResult.getData>() } returns Mono.error(RuntimeException("That's wrong!")) - every { dgsQueryExecutor.execute("{ hello }", emptyMap()) } returns executionResult - - val slot = slot() - every { webSocketSession.sendMessage(capture(slot)) } just Runs - - dgsWebsocketHandler.handleTextMessage(webSocketSession, queryMessage) - - val returnMessage = objectMapper.readValue(slot.captured.asBytes()) - assertThat(returnMessage.type).isEqualTo(GQL_ERROR) - assertThat((returnMessage.payload as DataPayload).errors?.size).isEqualTo(1) - assertThat((returnMessage.payload as DataPayload).errors?.get(0)).isEqualTo("That's wrong!") - } - - private fun nextWithError( - webSocketSession: WebSocketSession, - nrOfResults: Int, - ) { - val results = - (1..nrOfResults).map { - val result1 = mockkClass(ExecutionResult::class) - every { result1.getData() } returns null - every { result1.errors } returns - listOf(ExceptionWhileDataFetching(ResultPath.rootPath(), RuntimeException("Error in data fetcher"), null)) - result1 - } - every { webSocketSession.isOpen } returns true - every { executionResult.getData>() } returns - Mono.just(results).flatMapMany { Flux.fromIterable(results) } - every { dgsQueryExecutor.execute("{ hello }", emptyMap()) } returns executionResult - - val slotList = mutableListOf() - every { webSocketSession.sendMessage(capture(slotList)) } just Runs - - dgsWebsocketHandler.handleTextMessage(webSocketSession, queryMessage) - - val returnMessage = objectMapper.readValue(slotList[0].asBytes()) - assertThat(returnMessage.type).isEqualTo(GQL_DATA) - - val payload = returnMessage.payload as DataPayload - - assertThat(payload.errors) - .hasSize(1) - .element(0) - .asInstanceOf(MAP) - .extracting("message") - .asString() - .isEqualTo("Exception while fetching data () : Error in data fetcher") - } - - private fun stop(webSocketSession: WebSocketSession) { - val currentNrOfSessions = dgsWebsocketHandler.sessions.size - every { webSocketSession.close() } just Runs - - val textMessage = - TextMessage( - """ - { - "type": "$GQL_STOP", - "id": "123" - } - """.trimIndent(), - ) - - dgsWebsocketHandler.handleTextMessage(webSocketSession, textMessage) - - assertThat(dgsWebsocketHandler.sessions.size).isEqualTo(currentNrOfSessions) - assertThat(dgsWebsocketHandler.subscriptions[webSocketSession.id]?.get("123")).isNull() - } -} diff --git a/graphql-dgs-webflux-starter/build.gradle.kts b/graphql-dgs-webflux-starter/build.gradle.kts deleted file mode 100644 index bc6177a75..000000000 --- a/graphql-dgs-webflux-starter/build.gradle.kts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -dependencies { - api(project(":graphql-dgs-spring-boot-oss-autoconfigure")) - api(project(":graphql-dgs-spring-webflux-autoconfigure")) - api(project(":graphql-dgs-client")) - api(project(":graphql-error-types")) - api("org.springframework.boot:spring-boot-starter-webflux") -} diff --git a/graphql-dgs-webflux-starter/src/main/kotlin/com/netflix/graphql/dgs/starter/LegacyStarterWarning.kt b/graphql-dgs-webflux-starter/src/main/kotlin/com/netflix/graphql/dgs/starter/LegacyStarterWarning.kt deleted file mode 100644 index 20ec5d985..000000000 --- a/graphql-dgs-webflux-starter/src/main/kotlin/com/netflix/graphql/dgs/starter/LegacyStarterWarning.kt +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2024 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.starter - -import org.slf4j.Logger -import org.slf4j.LoggerFactory -import org.springframework.boot.context.event.ApplicationStartedEvent -import org.springframework.context.ApplicationListener - -class LegacyStarterWarning : ApplicationListener { - companion object { - private val LOGGER: Logger = LoggerFactory.getLogger(LegacyStarterWarning::class.java) - } - - override fun onApplicationEvent(event: ApplicationStartedEvent) { - LOGGER.warn( - "DEPRECATION WARNING - This project is using the deprecated 'graphql-dgs-webflux-starter'. Please switch to 'graphql-dgs-spring-graphql-starter'. For more context: https://netflix.github.io/dgs/spring-graphql-integration", - ) - } -} diff --git a/graphql-dgs-webflux-starter/src/main/resources/META-INF/spring.factories b/graphql-dgs-webflux-starter/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 05a087bfa..000000000 --- a/graphql-dgs-webflux-starter/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1 +0,0 @@ -org.springframework.context.ApplicationListener=com.netflix.graphql.dgs.starter.LegacyStarterWarning \ No newline at end of file diff --git a/graphql-dgs/src/main/kotlin/com/netflix/graphql/dgs/internal/DefaultDgsQueryExecutor.kt b/graphql-dgs/src/main/kotlin/com/netflix/graphql/dgs/internal/DefaultDgsQueryExecutor.kt deleted file mode 100644 index ed8e576db..000000000 --- a/graphql-dgs/src/main/kotlin/com/netflix/graphql/dgs/internal/DefaultDgsQueryExecutor.kt +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.internal - -import com.jayway.jsonpath.DocumentContext -import com.jayway.jsonpath.JsonPath -import com.jayway.jsonpath.TypeRef -import com.jayway.jsonpath.spi.mapper.MappingException -import com.netflix.graphql.dgs.DgsQueryExecutor -import com.netflix.graphql.dgs.exceptions.DgsQueryExecutionDataExtractionException -import com.netflix.graphql.dgs.exceptions.QueryException -import com.netflix.graphql.dgs.internal.BaseDgsQueryExecutor.parseContext -import com.netflix.graphql.dgs.internal.DefaultDgsQueryExecutor.ReloadSchemaIndicator -import graphql.ExecutionResult -import graphql.execution.ExecutionIdProvider -import graphql.execution.ExecutionStrategy -import graphql.execution.NonNullableFieldWasNullError -import graphql.execution.instrumentation.Instrumentation -import graphql.execution.preparsed.PreparsedDocumentProvider -import graphql.schema.GraphQLSchema -import org.intellij.lang.annotations.Language -import org.slf4j.Logger -import org.slf4j.LoggerFactory -import org.springframework.http.HttpHeaders -import org.springframework.web.context.request.RequestContextHolder -import org.springframework.web.context.request.ServletWebRequest -import org.springframework.web.context.request.WebRequest -import java.util.* -import java.util.concurrent.atomic.AtomicReference - -/** - * Main Query executing functionality. This should be reused between different transport protocols and the testing framework. - */ -class DefaultDgsQueryExecutor( - defaultSchema: GraphQLSchema, - private val schemaProvider: DgsSchemaProvider, - private val dataLoaderProvider: DgsDataLoaderProvider, - private val contextBuilder: DefaultDgsGraphQLContextBuilder, - private val instrumentation: Instrumentation?, - private val queryExecutionStrategy: ExecutionStrategy, - private val mutationExecutionStrategy: ExecutionStrategy, - private val idProvider: Optional, - private val reloadIndicator: ReloadSchemaIndicator = ReloadSchemaIndicator { false }, - private val preparsedDocumentProvider: PreparsedDocumentProvider? = null, - private val queryValueCustomizer: QueryValueCustomizer = QueryValueCustomizer { query -> query }, - private val requestCustomizer: DgsQueryExecutorRequestCustomizer = DgsQueryExecutorRequestCustomizer.DEFAULT_REQUEST_CUSTOMIZER, -) : DgsQueryExecutor { - val schema = AtomicReference(defaultSchema) - - override fun execute( - @Language("graphql") query: String?, - variables: Map, - extensions: Map?, - headers: HttpHeaders?, - operationName: String?, - webRequest: WebRequest?, - ): ExecutionResult { - val graphQLSchema: GraphQLSchema = - if (reloadIndicator.reloadSchema()) { - schema.updateAndGet { schemaProvider.schema().graphQLSchema } - } else { - schema.get() - } - - val request = requestCustomizer.apply(webRequest ?: RequestContextHolder.getRequestAttributes() as? WebRequest, headers) - val dgsContext = contextBuilder.build(DgsWebMvcRequestData(extensions, headers, request)) - - val executionResult = - BaseDgsQueryExecutor.baseExecute( - query = queryValueCustomizer.apply(query), - variables = variables, - extensions = extensions, - operationName = operationName, - dgsContext = dgsContext, - graphQLSchema = graphQLSchema, - dataLoaderProvider = dataLoaderProvider, - instrumentation = instrumentation, - queryExecutionStrategy = queryExecutionStrategy, - mutationExecutionStrategy = mutationExecutionStrategy, - idProvider = idProvider, - preparsedDocumentProvider = preparsedDocumentProvider, - ) - - // Check for NonNullableFieldWasNull errors, and log them explicitly because they don't run through the exception handlers. - val result = executionResult.get() - if (result.errors.size > 0) { - val nullValueError = result.errors.find { it is NonNullableFieldWasNullError } - if (nullValueError != null) { - logger.error("{}", nullValueError.message) - } - } - - return result - } - - override fun executeAndExtractJsonPath( - @Language("graphql") query: String, - jsonPath: String, - variables: Map, - ): T = JsonPath.read(getJsonResult(query, variables), jsonPath) - - override fun executeAndExtractJsonPath( - @Language("graphql") query: String, - jsonPath: String, - headers: HttpHeaders, - ): T = JsonPath.read(getJsonResult(query, emptyMap(), headers), jsonPath) - - override fun executeAndExtractJsonPath( - @Language("graphql") query: String, - jsonPath: String, - servletWebRequest: ServletWebRequest, - ): T { - val httpHeaders = HttpHeaders() - servletWebRequest.headerNames.forEach { name -> - httpHeaders.addAll(name, servletWebRequest.getHeaderValues(name).orEmpty().toList()) - } - return JsonPath.read(getJsonResult(query, emptyMap(), httpHeaders, servletWebRequest), jsonPath) - } - - override fun executeAndExtractJsonPathAsObject( - @Language("graphql") query: String, - jsonPath: String, - variables: Map, - clazz: Class, - headers: HttpHeaders?, - ): T { - val jsonResult = getJsonResult(query, variables, headers) - return try { - parseContext.parse(jsonResult).read(jsonPath, clazz) - } catch (ex: MappingException) { - throw DgsQueryExecutionDataExtractionException(ex, jsonResult, jsonPath, clazz) - } - } - - override fun executeAndExtractJsonPathAsObject( - @Language("graphql") query: String, - jsonPath: String, - variables: Map, - typeRef: TypeRef, - headers: HttpHeaders?, - ): T { - val jsonResult = getJsonResult(query, variables, headers) - return try { - parseContext.parse(jsonResult).read(jsonPath, typeRef) - } catch (ex: MappingException) { - throw DgsQueryExecutionDataExtractionException(ex, jsonResult, jsonPath, typeRef) - } - } - - override fun executeAndGetDocumentContext( - @Language("graphql") query: String, - variables: Map, - ): DocumentContext = parseContext.parse(getJsonResult(query, variables)) - - override fun executeAndGetDocumentContext( - @Language("graphql") query: String, - variables: MutableMap, - headers: HttpHeaders?, - ): DocumentContext = parseContext.parse(getJsonResult(query, variables, headers)) - - private fun getJsonResult( - @Language("graphql") query: String, - variables: Map, - headers: HttpHeaders? = null, - servletWebRequest: ServletWebRequest? = null, - ): String { - val executionResult = execute(query, variables, null, headers, null, servletWebRequest) - - if (executionResult.errors.size > 0) { - throw QueryException(executionResult.errors) - } - - return BaseDgsQueryExecutor.objectMapper.writeValueAsString(executionResult.toSpecification()) - } - - /** - * Provides the means to identify if executor should reload the [GraphQLSchema] from the given [DgsSchemaProvider]. - * If `true` the schema will be reloaded, else the default schema, provided in the cunstructor of the [DefaultDgsQueryExecutor], - * will be used. - * - * @implSpec The implementation should be thread-safe. - */ - @FunctionalInterface - fun interface ReloadSchemaIndicator { - fun reloadSchema(): Boolean - } - - companion object { - private val logger: Logger = LoggerFactory.getLogger(DefaultDgsQueryExecutor::class.java) - } -} diff --git a/graphql-dgs/src/test/kotlin/com/netflix/graphql/dgs/context/DgsContextTest.kt b/graphql-dgs/src/test/kotlin/com/netflix/graphql/dgs/context/DgsContextTest.kt deleted file mode 100644 index 7a4b717e4..000000000 --- a/graphql-dgs/src/test/kotlin/com/netflix/graphql/dgs/context/DgsContextTest.kt +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright 2023 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.context - -import com.netflix.graphql.dgs.* -import com.netflix.graphql.dgs.internal.DefaultDgsGraphQLContextBuilder -import com.netflix.graphql.dgs.internal.DefaultDgsQueryExecutor -import com.netflix.graphql.dgs.internal.DefaultInputObjectMapper -import com.netflix.graphql.dgs.internal.DgsDataLoaderProvider -import com.netflix.graphql.dgs.internal.DgsSchemaProvider -import com.netflix.graphql.dgs.internal.method.DataFetchingEnvironmentArgumentResolver -import com.netflix.graphql.dgs.internal.method.InputArgumentResolver -import com.netflix.graphql.dgs.internal.method.MethodDataFetcherFactory -import graphql.execution.AsyncExecutionStrategy -import graphql.execution.AsyncSerialExecutionStrategy -import graphql.execution.instrumentation.SimplePerformantInstrumentation -import org.assertj.core.api.Assertions.assertThat -import org.dataloader.BatchLoaderEnvironment -import org.dataloader.BatchLoaderWithContext -import org.junit.jupiter.api.Test -import org.springframework.boot.test.context.runner.ApplicationContextRunner -import org.springframework.context.ApplicationContext -import org.springframework.http.HttpHeaders -import java.util.* -import java.util.concurrent.CompletableFuture -import java.util.concurrent.CompletionStage - -internal class DgsContextTest { - private val applicationContextRunner: ApplicationContextRunner = - ApplicationContextRunner() - .withBean(DgsDataLoaderProvider::class.java) - - @Test - fun `getRequestData should return request data with headers`() { - applicationContextRunner.withBean(DgsTestComponent::class.java).run { context -> - val dgsQueryExecutor = createQueryExecutor(context, "type Query { hello(name: String): String }") - - val httpHeaders = HttpHeaders() - httpHeaders.add("x-name-prefix", "Hello ") - - val hello = - dgsQueryExecutor.executeAndExtractJsonPathAsObject( - """{hello(name: "World")}""", - "data.hello", - emptyMap(), - String::class.java, - httpHeaders, - ) - - assertThat(hello).isEqualTo("Hello World") - } - } - - private fun createQueryExecutor( - context: ApplicationContext, - schemaString: String, - ): DefaultDgsQueryExecutor { - val provider = - DgsSchemaProvider( - applicationContext = context, - federationResolver = Optional.empty(), - existingTypeDefinitionRegistry = Optional.empty(), - methodDataFetcherFactory = - MethodDataFetcherFactory( - listOf( - InputArgumentResolver(DefaultInputObjectMapper()), - DataFetchingEnvironmentArgumentResolver(context), - ), - ), - ) - - return DefaultDgsQueryExecutor( - defaultSchema = provider.schema(schemaString).graphQLSchema, - schemaProvider = provider, - dataLoaderProvider = context.getBean(DgsDataLoaderProvider::class.java), - contextBuilder = DefaultDgsGraphQLContextBuilder(Optional.empty()), - instrumentation = SimplePerformantInstrumentation.INSTANCE, - queryExecutionStrategy = AsyncExecutionStrategy(), - mutationExecutionStrategy = AsyncSerialExecutionStrategy(), - idProvider = Optional.empty(), - ) - } - - @DgsComponent - class DgsTestComponent { - @DgsQuery - fun hello( - @InputArgument name: String, - dfe: DgsDataFetchingEnvironment, - ): CompletableFuture { - val loader = dfe.getDataLoader(HelloLoader::class.java) - return loader.load(name) - } - - @DgsDataLoader - class HelloLoader : BatchLoaderWithContext { - override fun load( - keys: List, - env: BatchLoaderEnvironment, - ): CompletionStage> { - val prefix = DgsContext.getRequestData(env)?.headers?.getFirst("x-name-prefix") ?: "" - return CompletableFuture.completedFuture(keys.map { prefix + it }) - } - } - } -} diff --git a/graphql-dgs/src/test/kotlin/com/netflix/graphql/dgs/internal/DefaultDgsQueryExecutorTest.kt b/graphql-dgs/src/test/kotlin/com/netflix/graphql/dgs/internal/DefaultDgsQueryExecutorTest.kt deleted file mode 100644 index 406fa1dec..000000000 --- a/graphql-dgs/src/test/kotlin/com/netflix/graphql/dgs/internal/DefaultDgsQueryExecutorTest.kt +++ /dev/null @@ -1,507 +0,0 @@ -/* - * Copyright 2021 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.graphql.dgs.internal - -import com.jayway.jsonpath.TypeRef -import com.jayway.jsonpath.spi.mapper.MappingException -import com.netflix.graphql.dgs.DgsComponent -import com.netflix.graphql.dgs.DgsData -import com.netflix.graphql.dgs.DgsDirective -import com.netflix.graphql.dgs.DgsExecutionResult -import com.netflix.graphql.dgs.DgsScalar -import com.netflix.graphql.dgs.InputArgument -import com.netflix.graphql.dgs.LocalDateTimeScalar -import com.netflix.graphql.dgs.exceptions.DgsBadRequestException -import com.netflix.graphql.dgs.exceptions.DgsQueryExecutionDataExtractionException -import com.netflix.graphql.dgs.exceptions.QueryException -import com.netflix.graphql.dgs.internal.method.InputArgumentResolver -import com.netflix.graphql.dgs.internal.method.MethodDataFetcherFactory -import graphql.InvalidSyntaxError -import graphql.execution.AsyncExecutionStrategy -import graphql.execution.AsyncSerialExecutionStrategy -import graphql.execution.UnknownOperationException -import graphql.execution.instrumentation.SimplePerformantInstrumentation -import io.mockk.every -import io.mockk.impl.annotations.MockK -import io.mockk.junit5.MockKExtension -import org.assertj.core.api.Assertions -import org.assertj.core.api.Assertions.LIST -import org.assertj.core.api.Assertions.assertThat -import org.assertj.core.api.InstanceOfAssertFactory -import org.dataloader.DataLoaderRegistry -import org.junit.jupiter.api.BeforeEach -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.assertThrows -import org.junit.jupiter.api.extension.ExtendWith -import org.springframework.context.ApplicationContext -import org.springframework.http.HttpHeaders -import org.springframework.http.HttpStatus -import java.time.LocalDateTime -import java.util.Optional -import java.util.function.Supplier - -@Suppress("GraphQLUnresolvedReference") -@ExtendWith(MockKExtension::class) -internal class DefaultDgsQueryExecutorTest { - companion object { - private val DGS_RESULT = InstanceOfAssertFactory(DgsExecutionResult::class.java, Assertions::assertThat) - } - - @MockK - lateinit var applicationContextMock: ApplicationContext - - @MockK - lateinit var dgsDataLoaderProvider: DgsDataLoaderProvider - - lateinit var dgsQueryExecutor: DefaultDgsQueryExecutor - - @BeforeEach - fun createExecutor() { - val fetcher = - object { - @DgsData(parentType = "Query", field = "hello") - fun hello(): String = "hi!" - } - - val numbersFetcher = - object { - @DgsData(parentType = "Query", field = "numbers") - fun hello(): List = listOf(1, 2, 3) - } - - val moviesFetcher = - object { - @DgsData(parentType = "Query", field = "movies") - fun movies(): List = listOf(Movie("Extraction", LocalDateTime.MIN), Movie("Da 5 Bloods", LocalDateTime.MAX)) - } - - val fetcherWithError = - object { - @DgsData(parentType = "Query", field = "withError") - fun withError(): String = throw RuntimeException("Broken!") - } - - val echoFetcher = - object { - @DgsData(parentType = "Query", field = "echo") - fun echo( - @InputArgument("message") message: String, - ): String = message - } - - every { applicationContextMock.getBeansWithAnnotation(DgsComponent::class.java) } returns - mapOf( - "helloFetcher" to fetcher, - "numbersFetcher" to numbersFetcher, - "moviesFetcher" to moviesFetcher, - "withErrorFetcher" to fetcherWithError, - "echoFetcher" to echoFetcher, - ) - every { applicationContextMock.getBeansWithAnnotation(DgsScalar::class.java) } returns - mapOf("DateTimeScalar" to LocalDateTimeScalar()) - every { applicationContextMock.getBeansWithAnnotation(DgsDirective::class.java) } returns emptyMap() - every { dgsDataLoaderProvider.buildRegistryWithContextSupplier(any>()) } returns DataLoaderRegistry() - - val provider = - DgsSchemaProvider( - applicationContext = applicationContextMock, - federationResolver = Optional.empty(), - existingTypeDefinitionRegistry = Optional.empty(), - methodDataFetcherFactory = MethodDataFetcherFactory(listOf(InputArgumentResolver(DefaultInputObjectMapper()))), - ) - - val schema = - provider - .schema( - """ - type Query { - hello: String - numbers: [Int] - movies: [Movie] - withError: String - echo(message: String): String - } - - type Movie { - title: String - releaseDate: DateTime - } - - type Person { - name: String - } - - scalar DateTime - """.trimIndent(), - ).graphQLSchema - - dgsQueryExecutor = - DefaultDgsQueryExecutor( - defaultSchema = schema, - schemaProvider = provider, - dataLoaderProvider = dgsDataLoaderProvider, - contextBuilder = DefaultDgsGraphQLContextBuilder(Optional.empty()), - instrumentation = SimplePerformantInstrumentation.INSTANCE, - queryExecutionStrategy = AsyncExecutionStrategy(), - mutationExecutionStrategy = AsyncSerialExecutionStrategy(), - idProvider = Optional.empty(), - ) - } - - @Test - fun `Empty query returns DgsExecutionResult with NULL_OR_EMPTY_QUERY_EXCEPTION`() { - val result = dgsQueryExecutor.execute(" ") - - assertThat(result) - .isNotNull - .isInstanceOf(DgsExecutionResult::class.java) - - assertThat( - result - .errors - .first() - .extensions["errorType"], - // default bad request error type - ).isEqualTo( - DgsBadRequestException() - .errorType - .name, - ) - - assertThat( - result - .errors - .first() - .message, - ).isEqualTo(DgsBadRequestException.NULL_OR_EMPTY_QUERY_EXCEPTION.message) - - assertThat(result) - .asInstanceOf(DGS_RESULT) - .extracting { it.toSpringResponse() } - .extracting { it.statusCode } - .isEqualTo(HttpStatus.BAD_REQUEST) - } - - @Test - fun `Invalid Syntax query returns a GraphQL Error wth type SyntaxError`() { - val result = dgsQueryExecutor.execute("a") - assertThat(result) - .isNotNull - .extracting { it.errors } - .asInstanceOf(LIST) - .singleElement() - .isInstanceOf(InvalidSyntaxError::class.java) - } - - @Test - fun `Invalid operation returns a GraphQL Error with type UnknownOperationException`() { - val result = dgsQueryExecutor.execute("""{ movies { title } }""", emptyMap(), "foo") - assertThat(result) - .isNotNull - .extracting { it.errors } - .asInstanceOf(LIST) - .singleElement() - .isInstanceOf(UnknownOperationException::class.java) - - assertThat(result) - .asInstanceOf(DGS_RESULT) - .extracting { it.toSpringResponse() } - .extracting { it.statusCode } - .isEqualTo(HttpStatus.BAD_REQUEST) - } - - @Test - fun extractJsonWithString() { - val helloResult = - dgsQueryExecutor.executeAndExtractJsonPath( - """ - { - hello - } - """.trimIndent(), - "data.hello", - ) - - assertThat(helloResult).isEqualTo("hi!") - } - - @Test - fun extractJsonWithListOfString() { - val numbers = - dgsQueryExecutor.executeAndExtractJsonPath>( - """ - { - numbers - } - """.trimIndent(), - "data.numbers", - ) - - assertThat(numbers).isEqualTo(listOf(1, 2, 3)) - } - - @Test - fun extractJsonWithObjectListAsMap() { - val movies = - dgsQueryExecutor.executeAndExtractJsonPath>>( - """ - { - movies { title releaseDate } - } - """.trimIndent(), - "data.movies", - ) - - assertThat(movies[0]["title"]).isEqualTo("Extraction") - assertThat(LocalDateTime.parse(movies[0]["releaseDate"] as CharSequence)).isEqualTo(LocalDateTime.MIN) - } - - @Test - fun extractJsonAsObjectAsMap() { - val movie = - dgsQueryExecutor.executeAndExtractJsonPath>( - """ - { - movies { title releaseDate } - } - """.trimIndent(), - "data.movies[0]", - ) - - assertThat(movie["title"]).isEqualTo("Extraction") - assertThat(LocalDateTime.parse(movie["releaseDate"] as CharSequence)).isEqualTo(LocalDateTime.MIN) - } - - @Test - fun extractJsonAsObject() { - val movie = - dgsQueryExecutor.executeAndExtractJsonPathAsObject( - """ - { - movies { title releaseDate } - } - """.trimIndent(), - "data.movies[0]", - Movie::class.java, - ) - - assertThat(movie.title).isEqualTo("Extraction") - assertThat(movie.releaseDate).isEqualTo(LocalDateTime.MIN) - } - - @Test - fun extractJsonAsObjectWithTypeRef() { - val person = - dgsQueryExecutor.executeAndExtractJsonPathAsObject( - """ - { - movies { title releaseDate } - } - """.trimIndent(), - "data.movies", - object : TypeRef>() {}, - ) - - assertThat(person).isInstanceOf(List::class.java) - assertThat(person[0]).isExactlyInstanceOf(Movie::class.java) - } - - @Test - fun extractJsonAsObjectTypeRefWithVariables() { - val expectedMessage = "hello dgs" - val message = - dgsQueryExecutor.executeAndExtractJsonPathAsObject( - "query echo(\$message: String) { echo(message: \$message)}", - "data.echo", - mapOf("message" to expectedMessage), - object : TypeRef() {}, - ) - - assertThat(message).isEqualTo(expectedMessage) - } - - @Test - fun extractJsonAsObjectTypeRefWithHeadersNotThrow() { - val httpHeaders = HttpHeaders() - httpHeaders.add("test", "headerValue") - - val expectedMessage = "hello dgs" - val message = - dgsQueryExecutor.executeAndExtractJsonPathAsObject( - "query echo(\$message: String) { echo(message: \$message)}", - "data.echo", - mapOf("message" to expectedMessage), - object : TypeRef() {}, - httpHeaders, - ) - - assertThat(message).isEqualTo(expectedMessage) - } - - @Test - fun extractJsonAsObjectClazzWithVariables() { - val expectedMessage = "hello dgs" - val message = - dgsQueryExecutor.executeAndExtractJsonPathAsObject( - "query echo(\$message: String) { echo(message: \$message)}", - "data.echo", - mapOf("message" to expectedMessage), - String::class.java, - ) - - assertThat(message).isEqualTo(expectedMessage) - } - - @Test - fun extractJsonAsObjectClazzWithHeadersNotThrow() { - val httpHeaders = HttpHeaders() - httpHeaders.add("test", "headerValue") - - val expectedMessage = "hello dgs" - val message = - dgsQueryExecutor.executeAndExtractJsonPathAsObject( - "query echo(\$message: String) { echo(message: \$message)}", - "data.echo", - mapOf("message" to expectedMessage), - String::class.java, - httpHeaders, - ) - - assertThat(message).isEqualTo(expectedMessage) - } - - @Test - fun extractError() { - val queryException = - assertThrows { - dgsQueryExecutor.executeAndExtractJsonPath( - """ - { - withError - } - """.trimIndent(), - "data.withError", - ) - } - - assertThat(queryException.message).contains("Broken!") - } - - @Test - fun extractJsonAsObjectError() { - val assertThrows = - assertThrows { - dgsQueryExecutor.executeAndExtractJsonPathAsObject( - """ - { - movies { title } - } - """.trimIndent(), - "data.movies[0]", - String::class.java, - ) - } - - assertThat( - assertThrows.message, - ).isEqualTo( - "Error deserializing data from '{\"data\":{\"movies\":[{\"title\":\"Extraction\"},{\"title\":\"Da 5 Bloods\"}]}}' with JsonPath 'data.movies[0]' and target class java.lang.String", - ) - assertThat(assertThrows.cause).isInstanceOf(MappingException::class.java) - assertThat(assertThrows.jsonResult).isEqualTo("{\"data\":{\"movies\":[{\"title\":\"Extraction\"},{\"title\":\"Da 5 Bloods\"}]}}") - assertThat(assertThrows.jsonPath).isEqualTo("data.movies[0]") - assertThat(assertThrows.targetClass).isEqualTo(String::class.java.name) - } - - @Test - fun extractJsonAsTypeRefError() { - val assertThrows = - assertThrows { - dgsQueryExecutor.executeAndExtractJsonPathAsObject( - """ - { - movies { title } - } - """.trimIndent(), - "data.movies[0]", - object : TypeRef>() {}, - ) - } - - assertThat( - assertThrows.message, - ).isEqualTo( - "Error deserializing data from '{\"data\":{\"movies\":[{\"title\":\"Extraction\"},{\"title\":\"Da 5 Bloods\"}]}}' with JsonPath 'data.movies[0]' and target class java.util.List", - ) - assertThat(assertThrows.cause).isInstanceOf(MappingException::class.java) - assertThat(assertThrows.jsonResult).isEqualTo("{\"data\":{\"movies\":[{\"title\":\"Extraction\"},{\"title\":\"Da 5 Bloods\"}]}}") - assertThat(assertThrows.jsonPath).isEqualTo("data.movies[0]") - assertThat(assertThrows.targetClass).isEqualTo("java.util.List") - } - - @Test - fun documentContext() { - val context = - dgsQueryExecutor.executeAndGetDocumentContext( - """ - { - movies { title releaseDate } - } - """.trimIndent(), - ) - - val movieList = context.read("data.movies", object : TypeRef>() {}) - assertThat(movieList.size).isEqualTo(2) - val movie = context.read("data.movies[0]", Movie::class.java) - assertThat(movie).isNotNull - } - - @Test - fun documentContextWithTypename() { - val context = - dgsQueryExecutor.executeAndGetDocumentContext( - """ - { - movies { title __typename } - } - """.trimIndent(), - ) - - val movie = context.read("data.movies[0]", Movie::class.java) - assertThat(movie).isNotNull - } - - @Test - fun withFieldNamedErrors() { - val context = - dgsQueryExecutor.executeAndGetDocumentContext( - """ - { - movies { title __typename } - } - """.trimIndent(), - ) - - val movie = context.read("data.movies[0]", Movie::class.java) - assertThat(movie).isNotNull - } -} - -data class Movie( - val title: String, - val releaseDate: LocalDateTime?, -) diff --git a/settings.gradle.kts b/settings.gradle.kts index 242d13c25..949ef773a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -29,26 +29,12 @@ include("graphql-dgs") include("graphql-error-types") include("graphql-dgs-mocking") include("graphql-dgs-client") -include("graphql-dgs-spring-boot-oss-autoconfigure") -include("graphql-dgs-spring-webmvc") -include("graphql-dgs-spring-webmvc-autoconfigure") -include("graphql-dgs-spring-boot-starter") -include("graphql-dgs-example-java") -include("graphql-dgs-example-java-webflux") -include("graphql-dgs-subscriptions-websockets") -include("graphql-dgs-subscriptions-websockets-autoconfigure") -include("graphql-dgs-subscriptions-graphql-sse") -include("graphql-dgs-subscriptions-graphql-sse-autoconfigure") -include("graphql-dgs-subscriptions-sse") -include("graphql-dgs-subscriptions-sse-autoconfigure") include("graphql-dgs-spring-boot-micrometer") include("graphql-dgs-platform") include("graphql-dgs-platform-dependencies") include("graphql-dgs-extended-scalars") include("graphql-dgs-extended-validation") -include("graphql-dgs-spring-webflux-autoconfigure") include("graphql-dgs-reactive") -include("graphql-dgs-webflux-starter") include("graphql-dgs-example-shared") include("graphql-dgs-pagination") include("graphql-dgs-subscription-types")