From ba6eeb4ccf564fc84580cc7d58af99efb7f0d8ed Mon Sep 17 00:00:00 2001 From: Shane Myrick Date: Wed, 16 Oct 2019 10:16:05 -0700 Subject: [PATCH 1/4] Move spring-boot version to single location Move the declared verion of spring-boot to the root so we use the same version across all the modules and examples --- examples/federation/base-app/pom.xml | 2 -- examples/federation/extend-app/pom.xml | 2 -- examples/spring/pom.xml | 2 -- graphql-kotlin-spring-server/pom.xml | 1 - pom.xml | 1 + 5 files changed, 1 insertion(+), 7 deletions(-) diff --git a/examples/federation/base-app/pom.xml b/examples/federation/base-app/pom.xml index 58bbdc6e8..63f7a9ffc 100644 --- a/examples/federation/base-app/pom.xml +++ b/examples/federation/base-app/pom.xml @@ -14,8 +14,6 @@ jar - 2.2.0.M5 - true diff --git a/examples/federation/extend-app/pom.xml b/examples/federation/extend-app/pom.xml index cd4678507..5bb3a08c1 100644 --- a/examples/federation/extend-app/pom.xml +++ b/examples/federation/extend-app/pom.xml @@ -14,8 +14,6 @@ jar - 2.2.0.M5 - true diff --git a/examples/spring/pom.xml b/examples/spring/pom.xml index 4136d32db..a220b380a 100644 --- a/examples/spring/pom.xml +++ b/examples/spring/pom.xml @@ -14,8 +14,6 @@ jar - 2.2.0.M5 - true diff --git a/graphql-kotlin-spring-server/pom.xml b/graphql-kotlin-spring-server/pom.xml index be7f2804e..000fecec8 100644 --- a/graphql-kotlin-spring-server/pom.xml +++ b/graphql-kotlin-spring-server/pom.xml @@ -12,7 +12,6 @@ jar - 2.2.0.RC1 3.3.0.RELEASE 1.0.0.RELEASE diff --git a/pom.xml b/pom.xml index a5637ba59..f12bc8b44 100644 --- a/pom.xml +++ b/pom.xml @@ -66,6 +66,7 @@ 1.3.50 1.3.2 0.9.11 + 2.2.0.RC1 5.5.2 From 9158ab673c6698e149976c6a01743fb0b47e5da6 Mon Sep 17 00:00:00 2001 From: Shane Myrick Date: Wed, 16 Oct 2019 10:20:51 -0700 Subject: [PATCH 2/4] Update README docs --- examples/spring/README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/spring/README.md b/examples/spring/README.md index 576b1f814..d2e92bea6 100644 --- a/examples/spring/README.md +++ b/examples/spring/README.md @@ -3,16 +3,18 @@ One way to run a GraphQL server is with [Spring Boot](https://github.com/spring-projects/spring-boot). This example app uses [Spring Webflux](https://docs.spring.io/spring/docs/current/spring-framework-reference/web-reactive.html) together with `graphql-kotlin` and [graphql-playground](https://github.com/prisma/graphql-playground). ### Running locally -Build the application -```bash +First you must build all the other modules since this is a multi-module project. + +From the root directory: + +```shell script mvn clean install ``` -Start the server: +Then to start the server: * Run `Application.kt` directly from your IDE -* Alternatively you can also use the spring boot maven plugin by running `mvn spring-boot:run` from the command line. - +* Alternatively you can also use the spring boot maven plugin by running `mvn spring-boot:run` from the command line in the spring example directory. -Once the app has started you can explore the example schema by opening Playground endpoint at http://localhost:8080/playground. +Once the app has started you can explore the example schema by opening the GraphQL Playground endpoint at http://localhost:8080/playground. From cea0002aea660c35248d8b9fc62e0c4c5527fffa Mon Sep 17 00:00:00 2001 From: Shane Myrick Date: Wed, 16 Oct 2019 10:52:09 -0700 Subject: [PATCH 3/4] Update parent/child for the examples --- examples/federation/base-app/pom.xml | 4 ++-- examples/federation/extend-app/pom.xml | 4 ++-- examples/federation/pom.xml | 10 +++++----- examples/pom.xml | 2 +- examples/spring/pom.xml | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/federation/base-app/pom.xml b/examples/federation/base-app/pom.xml index 63f7a9ffc..8ed991c2d 100644 --- a/examples/federation/base-app/pom.xml +++ b/examples/federation/base-app/pom.xml @@ -3,9 +3,9 @@ 4.0.0 com.expediagroup - graphql-kotlin + federation 1.1.1-SNAPSHOT - ../../.. + .. base-app diff --git a/examples/federation/extend-app/pom.xml b/examples/federation/extend-app/pom.xml index 5bb3a08c1..17d9c0fdd 100644 --- a/examples/federation/extend-app/pom.xml +++ b/examples/federation/extend-app/pom.xml @@ -3,9 +3,9 @@ 4.0.0 com.expediagroup - graphql-kotlin + federation 1.1.1-SNAPSHOT - ../../.. + .. extend-app diff --git a/examples/federation/pom.xml b/examples/federation/pom.xml index d96f03bbe..6cf1fe7c9 100644 --- a/examples/federation/pom.xml +++ b/examples/federation/pom.xml @@ -2,10 +2,10 @@ 4.0.0 - graphql-kotlin com.expediagroup + examples 1.1.1-SNAPSHOT - ../.. + .. federation @@ -78,7 +78,7 @@ validate - + @@ -94,10 +94,10 @@ io.gitlab.arturbosch.detekt detekt-cli - ${detekt-cli.version} + ${detekt.version} - com.github.shyiko + com.pinterest ktlint ${ktlint.version} diff --git a/examples/pom.xml b/examples/pom.xml index 4d5bbd289..8d58087ce 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -2,8 +2,8 @@ 4.0.0 - graphql-kotlin com.expediagroup + graphql-kotlin 1.1.1-SNAPSHOT .. diff --git a/examples/spring/pom.xml b/examples/spring/pom.xml index a220b380a..201a61cc0 100644 --- a/examples/spring/pom.xml +++ b/examples/spring/pom.xml @@ -3,9 +3,9 @@ 4.0.0 com.expediagroup - graphql-kotlin + examples 1.1.1-SNAPSHOT - ../.. + .. spring-example From 6cd8288e5fae1b4c8dc8571623b3d829f097ae45 Mon Sep 17 00:00:00 2001 From: Shane Myrick Date: Wed, 16 Oct 2019 13:04:47 -0700 Subject: [PATCH 4/4] Update maven settings for root directory --- examples/federation/base-app/pom.xml | 1 + examples/federation/extend-app/pom.xml | 1 + examples/federation/pom.xml | 58 ------------------------- examples/spring/pom.xml | 1 + graphql-kotlin-federation/pom.xml | 5 ++- graphql-kotlin-schema-generator/pom.xml | 1 + graphql-kotlin-spring-server/pom.xml | 1 + pom.xml | 3 +- 8 files changed, 11 insertions(+), 60 deletions(-) diff --git a/examples/federation/base-app/pom.xml b/examples/federation/base-app/pom.xml index 8ed991c2d..d3c23b79c 100644 --- a/examples/federation/base-app/pom.xml +++ b/examples/federation/base-app/pom.xml @@ -14,6 +14,7 @@ jar + ${project.basedir}/../../.. true diff --git a/examples/federation/extend-app/pom.xml b/examples/federation/extend-app/pom.xml index 17d9c0fdd..eb49bb7db 100644 --- a/examples/federation/extend-app/pom.xml +++ b/examples/federation/extend-app/pom.xml @@ -14,6 +14,7 @@ jar + ${project.basedir}/../../.. true diff --git a/examples/federation/pom.xml b/examples/federation/pom.xml index 6cf1fe7c9..b2d047dfe 100644 --- a/examples/federation/pom.xml +++ b/examples/federation/pom.xml @@ -45,64 +45,6 @@ - - org.apache.maven.plugins - maven-antrun-plugin - 1.8 - - - - detekt - validate - - - - - - - - - - - - - - - - - run - - - - ktlint - validate - - - - - - - - - - - run - - - - - - io.gitlab.arturbosch.detekt - detekt-cli - ${detekt.version} - - - com.pinterest - ktlint - ${ktlint.version} - - - org.apache.maven.plugins maven-surefire-plugin diff --git a/examples/spring/pom.xml b/examples/spring/pom.xml index 201a61cc0..be99c64e1 100644 --- a/examples/spring/pom.xml +++ b/examples/spring/pom.xml @@ -14,6 +14,7 @@ jar + ${project.basedir}/../.. true diff --git a/graphql-kotlin-federation/pom.xml b/graphql-kotlin-federation/pom.xml index d9df1fc85..e22fb043f 100644 --- a/graphql-kotlin-federation/pom.xml +++ b/graphql-kotlin-federation/pom.xml @@ -10,9 +10,12 @@ graphql-kotlin-federation - graphql-kotlin-federation jar + + ${project.basedir}/.. + + ${project.basedir}/src/main/kotlin ${project.basedir}/src/test/kotlin diff --git a/graphql-kotlin-schema-generator/pom.xml b/graphql-kotlin-schema-generator/pom.xml index 3d727f679..82c9b2ff2 100644 --- a/graphql-kotlin-schema-generator/pom.xml +++ b/graphql-kotlin-schema-generator/pom.xml @@ -14,6 +14,7 @@ jar + ${project.basedir}/.. 2.2.12 diff --git a/graphql-kotlin-spring-server/pom.xml b/graphql-kotlin-spring-server/pom.xml index 000fecec8..43448c7bb 100644 --- a/graphql-kotlin-spring-server/pom.xml +++ b/graphql-kotlin-spring-server/pom.xml @@ -12,6 +12,7 @@ jar + ${project.basedir}/.. 3.3.0.RELEASE 1.0.0.RELEASE diff --git a/pom.xml b/pom.xml index f12bc8b44..d955c49ce 100644 --- a/pom.xml +++ b/pom.xml @@ -59,6 +59,7 @@ UTF-8 1.8 + ${project.basedir} 13.0 @@ -133,7 +134,7 @@ - +