diff --git a/.editorconfig b/.editorconfig index 7e423fc..f19323b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,5 +4,11 @@ root = true indent_style = space indent_size = 2 end_of_line = lf +insert_final_newline = true charset = utf-8 +max_line_length = 120 trim_trailing_whitespace = true + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7868269 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + check-lilo: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: maven + + - name: Build with Maven + run: mvn -B -ntp package + + - name: Format Check + run: mvn -B -ntp com.spotify.fmt:fmt-maven-plugin:2.21.1:check + + check-lilo-samples: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + + - name: Build lilo and cache + run: mvn -B -ntp clean install -DskipTests=true -Dgpg.skip -Dcheckstyle.skip -Denforcer.skip -Dmaven.javadoc.skip -Dmaven.source.skip + + - name: Check lilo samples + run: cd lilo-samples && mvn -B -ntp compile com.spotify.fmt:fmt-maven-plugin:2.21.1:check diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml deleted file mode 100644 index ac1af1f..0000000 --- a/.github/workflows/pr-check.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: PR Cheks - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'temurin' - cache: maven - - - name: Build with Maven - run: mvn -B -ntp package --file pom.xml diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 687668b..39a584e 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -14,5 +14,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/README.md b/README.md index 1f222bd..a6894ad 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Lilo +# Lilo [![Build Status](https://github.com/friatech/lilo/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/friatech/lilo/actions/workflows/ci.yml?query=branch%3Amain) [![Latest Release](https://img.shields.io/maven-central/v/io.fria/lilo?versionPrefix=23.)](https://maven-badges.herokuapp.com/maven-central/io.fria/lilo/) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Lilo and Stitch](resources/lilo-and-stitch.webp) -**Lilo** is a super-fast GraphQL stitching library. Project is heavily inspired by [Atlassian Braid](https://bitbucket.org/atlassian/graphql-braid). -**Lilo** focus on simplicity. You can find plenty of samples in the codebase and we aim to add more and more in every release. -Please do not forget to check `/lilo-samples` directory for more sample project. +**Lilo** is a super-fast GraphQL stitching library. The project is heavily inspired by [Atlassian Braid](https://bitbucket.org/atlassian/graphql-braid). +**Lilo** focuses on simplicity and easy to use. You can find plenty of samples in the codebase and we aim to add more and more in every release. +Please do not forget to check `/lilo-samples` directory for more sample projecta. ## Installation @@ -16,7 +16,7 @@ Just add a single **Lilo** dependency to your `pom.xml` file. io.fria lilo - 23.7.0 + 23.11.0 ... @@ -25,13 +25,13 @@ Just add a single **Lilo** dependency to your `pom.xml` file. If you're using gradle add the dependency to your `build.gradle` file. ```groovy -implementation 'io.fria:lilo:23.6.0' +implementation 'io.fria:lilo:23.11.0' ``` ## Basic Usage -Here is the story, Alice has 2 graphql microservices and she wants to make her gateway to dispatch -the graphql requests to their respective microservices. `Microservice A` provides a GraphQL query for user listing, +Here is the story, Alice has 2 GraphQL microservices and she wants to make her gateway to dispatch +the GraphQL requests to their respective microservices. `Microservice A` provides a GraphQL query for user listing, and `Microservice B` provides a GraphQL mutation for user creation. So Alice can use both query and mutation via just sending requests to the `Gateway` directly. **Lilo** stitches the GraphQL schemas and provides a combined schema. @@ -59,11 +59,11 @@ final Lilo lilo = Lilo.builder() .build(); ``` -But for complete working example you need to serve the stitching logic from a graphql endpoint. (Probably `/graphql`) +But for a complete working example you need to serve the stitching logic from a GraphQL endpoint. (Probably `/graphql`) Please examine the `01-spring-boot-hello-world` example in `lilo-samples` folder. -In most cases, we need an authentication or some sort of header manipulation. In that case, creating a custom -introspection and query retrievers might help us to modify outgoing requests or incoming responses. Following +In most cases, we need an authentication or some sort of header manipulation. In that case, creating custom +introspection and query retrievers might help us to modify outgoing requests or incoming responses. The following example shows a very basic example for custom retrievers. ```java @@ -83,7 +83,7 @@ example shows a very basic example for custom retrievers. ) ``` -For further details you can examine the `02-spring-boot-basic-stitching` example in `lilo-samples` folder. +For further details, you can examine the `02-spring-boot-basic-stitching` example in `lilo-samples` folder. If Gateway distributes the messages to `Microservice A` and also contains an embedded schema then the architecture might be something like this: diff --git a/lilo-samples/01-spring-boot-hello-world/.mvn/wrapper/maven-wrapper.properties b/lilo-samples/01-spring-boot-hello-world/.mvn/wrapper/maven-wrapper.properties index 687668b..39a584e 100644 --- a/lilo-samples/01-spring-boot-hello-world/.mvn/wrapper/maven-wrapper.properties +++ b/lilo-samples/01-spring-boot-hello-world/.mvn/wrapper/maven-wrapper.properties @@ -14,5 +14,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/lilo-samples/01-spring-boot-hello-world/lilo-gateway/pom.xml b/lilo-samples/01-spring-boot-hello-world/lilo-gateway/pom.xml index 5539dbb..e9e6bf3 100644 --- a/lilo-samples/01-spring-boot-hello-world/lilo-gateway/pom.xml +++ b/lilo-samples/01-spring-boot-hello-world/lilo-gateway/pom.xml @@ -9,7 +9,7 @@ org.springframework.boot spring-boot-starter-parent - 3.0.8 + 3.0.12 @@ -55,7 +55,7 @@ org.yaml snakeyaml - 2.0 + 2.2 @@ -67,7 +67,7 @@ io.fria lilo - 23.7.0 + 23.11.0 @@ -77,6 +77,14 @@ org.springframework.boot spring-boot-maven-plugin + + + maven-checkstyle-plugin + 3.3.0 + + ../../../config/checkstyle.xml + + diff --git a/lilo-samples/01-spring-boot-hello-world/pom.xml b/lilo-samples/01-spring-boot-hello-world/pom.xml index 40e65b6..3f3c34f 100644 --- a/lilo-samples/01-spring-boot-hello-world/pom.xml +++ b/lilo-samples/01-spring-boot-hello-world/pom.xml @@ -5,7 +5,7 @@ io.fria.lilo.samples.spring-boot-hello-world spring-boot-hello-world-parent - 23.7.0 + 23.11.0 pom 01-spring-boot-hello-world @@ -34,9 +34,26 @@ + + UTF-8 + UTF-8 + + lilo-gateway server1 server2 + + + + + maven-checkstyle-plugin + 3.3.0 + + ../../config/checkstyle.xml + + + + diff --git a/lilo-samples/01-spring-boot-hello-world/server1/pom.xml b/lilo-samples/01-spring-boot-hello-world/server1/pom.xml index 60dd22a..1d51fa0 100644 --- a/lilo-samples/01-spring-boot-hello-world/server1/pom.xml +++ b/lilo-samples/01-spring-boot-hello-world/server1/pom.xml @@ -9,7 +9,7 @@ org.springframework.boot spring-boot-starter-parent - 3.0.8 + 3.0.12 @@ -55,7 +55,7 @@ org.yaml snakeyaml - 2.0 + 2.2 @@ -76,6 +76,14 @@ org.springframework.boot spring-boot-maven-plugin + + + maven-checkstyle-plugin + 3.3.0 + + ../../../config/checkstyle.xml + + diff --git a/lilo-samples/01-spring-boot-hello-world/server2/pom.xml b/lilo-samples/01-spring-boot-hello-world/server2/pom.xml index 1e7fe0e..2a453be 100644 --- a/lilo-samples/01-spring-boot-hello-world/server2/pom.xml +++ b/lilo-samples/01-spring-boot-hello-world/server2/pom.xml @@ -9,7 +9,7 @@ org.springframework.boot spring-boot-starter-parent - 3.0.8 + 3.0.12 @@ -55,7 +55,7 @@ org.yaml snakeyaml - 2.0 + 2.2 @@ -76,6 +76,14 @@ org.springframework.boot spring-boot-maven-plugin + + + maven-checkstyle-plugin + 3.3.0 + + ../../../config/checkstyle.xml + + diff --git a/lilo-samples/02-spring-boot-basic-stitching/.mvn/wrapper/maven-wrapper.properties b/lilo-samples/02-spring-boot-basic-stitching/.mvn/wrapper/maven-wrapper.properties index 687668b..39a584e 100644 --- a/lilo-samples/02-spring-boot-basic-stitching/.mvn/wrapper/maven-wrapper.properties +++ b/lilo-samples/02-spring-boot-basic-stitching/.mvn/wrapper/maven-wrapper.properties @@ -14,5 +14,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/lilo-samples/02-spring-boot-basic-stitching/lilo-gateway/pom.xml b/lilo-samples/02-spring-boot-basic-stitching/lilo-gateway/pom.xml index 34ebe1f..d01d4fe 100644 --- a/lilo-samples/02-spring-boot-basic-stitching/lilo-gateway/pom.xml +++ b/lilo-samples/02-spring-boot-basic-stitching/lilo-gateway/pom.xml @@ -9,7 +9,7 @@ org.springframework.boot spring-boot-starter-parent - 3.0.8 + 3.0.12 @@ -39,20 +39,6 @@ - - - central - maven central - https://repo1.maven.org/maven2/ - - - - maven-atlassian-com - Atlassian Public Repository - https://packages.atlassian.com/maven/public - - - org.springframework.boot @@ -69,7 +55,7 @@ org.yaml snakeyaml - 2.0 + 2.2 @@ -81,13 +67,7 @@ io.fria lilo - 23.7.0 - - - - com.atlassian.braid - graphql-braid - 0.23.15 + 23.11.0 @@ -97,6 +77,14 @@ org.springframework.boot spring-boot-maven-plugin + + + maven-checkstyle-plugin + 3.3.0 + + ../../../config/checkstyle.xml + + diff --git a/lilo-samples/02-spring-boot-basic-stitching/pom.xml b/lilo-samples/02-spring-boot-basic-stitching/pom.xml index 7a69dbb..03d39cc 100644 --- a/lilo-samples/02-spring-boot-basic-stitching/pom.xml +++ b/lilo-samples/02-spring-boot-basic-stitching/pom.xml @@ -5,7 +5,7 @@ io.fria.lilo.samples.spring-boot-basic-stitching spring-boot-basic-stitching-parent - 23.7.0 + 23.11.0 pom 02-spring-boot-basic-stitching @@ -39,4 +39,21 @@ server1 server2 + + + UTF-8 + UTF-8 + + + + + + maven-checkstyle-plugin + 3.3.0 + + ../../config/checkstyle.xml + + + + diff --git a/lilo-samples/02-spring-boot-basic-stitching/server1/pom.xml b/lilo-samples/02-spring-boot-basic-stitching/server1/pom.xml index 4e5288b..88d5181 100644 --- a/lilo-samples/02-spring-boot-basic-stitching/server1/pom.xml +++ b/lilo-samples/02-spring-boot-basic-stitching/server1/pom.xml @@ -9,7 +9,7 @@ org.springframework.boot spring-boot-starter-parent - 3.0.8 + 3.0.12 @@ -55,7 +55,7 @@ org.yaml snakeyaml - 2.0 + 2.2 @@ -76,6 +76,14 @@ org.springframework.boot spring-boot-maven-plugin + + + maven-checkstyle-plugin + 3.3.0 + + ../../../config/checkstyle.xml + + diff --git a/lilo-samples/02-spring-boot-basic-stitching/server2/pom.xml b/lilo-samples/02-spring-boot-basic-stitching/server2/pom.xml index bab9692..adf2cef 100644 --- a/lilo-samples/02-spring-boot-basic-stitching/server2/pom.xml +++ b/lilo-samples/02-spring-boot-basic-stitching/server2/pom.xml @@ -9,7 +9,7 @@ org.springframework.boot spring-boot-starter-parent - 3.0.8 + 3.0.12 @@ -55,7 +55,7 @@ org.yaml snakeyaml - 2.0 + 2.2 @@ -76,6 +76,14 @@ org.springframework.boot spring-boot-maven-plugin + + + maven-checkstyle-plugin + 3.3.0 + + ../../../config/checkstyle.xml + + diff --git a/lilo-samples/03-spring-boot-local-stitching/.mvn/wrapper/maven-wrapper.properties b/lilo-samples/03-spring-boot-local-stitching/.mvn/wrapper/maven-wrapper.properties index 687668b..39a584e 100644 --- a/lilo-samples/03-spring-boot-local-stitching/.mvn/wrapper/maven-wrapper.properties +++ b/lilo-samples/03-spring-boot-local-stitching/.mvn/wrapper/maven-wrapper.properties @@ -14,5 +14,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/lilo-samples/03-spring-boot-local-stitching/lilo-gateway/pom.xml b/lilo-samples/03-spring-boot-local-stitching/lilo-gateway/pom.xml index 8fd2a6b..98d25fe 100644 --- a/lilo-samples/03-spring-boot-local-stitching/lilo-gateway/pom.xml +++ b/lilo-samples/03-spring-boot-local-stitching/lilo-gateway/pom.xml @@ -9,7 +9,7 @@ org.springframework.boot spring-boot-starter-parent - 3.0.8 + 3.0.12 @@ -39,20 +39,6 @@ - - - central - maven central - https://repo1.maven.org/maven2/ - - - - maven-atlassian-com - Atlassian Public Repository - https://packages.atlassian.com/maven/public - - - org.springframework.boot @@ -69,7 +55,7 @@ org.yaml snakeyaml - 2.0 + 2.2 @@ -81,13 +67,7 @@ io.fria lilo - 23.7.0 - - - - com.atlassian.braid - graphql-braid - 0.23.15 + 23.11.0 @@ -97,6 +77,14 @@ org.springframework.boot spring-boot-maven-plugin + + + maven-checkstyle-plugin + 3.3.0 + + ../../../config/checkstyle.xml + + diff --git a/lilo-samples/03-spring-boot-local-stitching/pom.xml b/lilo-samples/03-spring-boot-local-stitching/pom.xml index 30d6372..1e6b677 100644 --- a/lilo-samples/03-spring-boot-local-stitching/pom.xml +++ b/lilo-samples/03-spring-boot-local-stitching/pom.xml @@ -5,7 +5,7 @@ io.fria.lilo.samples.spring-boot-local-stitching spring-boot-local-stitching-parent - 23.7.0 + 23.11.0 pom 03-spring-boot-local-stitching @@ -38,4 +38,21 @@ lilo-gateway server1 + + + UTF-8 + UTF-8 + + + + + + maven-checkstyle-plugin + 3.3.0 + + ../../config/checkstyle.xml + + + + diff --git a/lilo-samples/03-spring-boot-local-stitching/server1/pom.xml b/lilo-samples/03-spring-boot-local-stitching/server1/pom.xml index 04f8d2f..d4ebdaa 100644 --- a/lilo-samples/03-spring-boot-local-stitching/server1/pom.xml +++ b/lilo-samples/03-spring-boot-local-stitching/server1/pom.xml @@ -9,7 +9,7 @@ org.springframework.boot spring-boot-starter-parent - 3.0.8 + 3.0.12 @@ -55,7 +55,7 @@ org.yaml snakeyaml - 2.0 + 2.2 @@ -76,6 +76,14 @@ org.springframework.boot spring-boot-maven-plugin + + + maven-checkstyle-plugin + 3.3.0 + + ../../../config/checkstyle.xml + + diff --git a/lilo-samples/04-spring-boot-reactive-stitching/.mvn/wrapper/maven-wrapper.properties b/lilo-samples/04-spring-boot-reactive-stitching/.mvn/wrapper/maven-wrapper.properties index 687668b..39a584e 100644 --- a/lilo-samples/04-spring-boot-reactive-stitching/.mvn/wrapper/maven-wrapper.properties +++ b/lilo-samples/04-spring-boot-reactive-stitching/.mvn/wrapper/maven-wrapper.properties @@ -14,5 +14,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/lilo-samples/04-spring-boot-reactive-stitching/lilo-gateway/pom.xml b/lilo-samples/04-spring-boot-reactive-stitching/lilo-gateway/pom.xml index f2afbb2..26d6f56 100644 --- a/lilo-samples/04-spring-boot-reactive-stitching/lilo-gateway/pom.xml +++ b/lilo-samples/04-spring-boot-reactive-stitching/lilo-gateway/pom.xml @@ -9,7 +9,7 @@ org.springframework.boot spring-boot-starter-parent - 3.0.8 + 3.0.12 @@ -55,7 +55,7 @@ org.yaml snakeyaml - 2.0 + 2.2 @@ -67,7 +67,7 @@ io.fria lilo - 23.7.0 + 23.11.0 @@ -77,6 +77,14 @@ org.springframework.boot spring-boot-maven-plugin + + + maven-checkstyle-plugin + 3.3.0 + + ../../../config/checkstyle.xml + + diff --git a/lilo-samples/04-spring-boot-reactive-stitching/pom.xml b/lilo-samples/04-spring-boot-reactive-stitching/pom.xml index 2ed62d7..4184be7 100644 --- a/lilo-samples/04-spring-boot-reactive-stitching/pom.xml +++ b/lilo-samples/04-spring-boot-reactive-stitching/pom.xml @@ -5,7 +5,7 @@ io.fria.lilo.samples.spring-boot-reactive-stitching spring-boot-reactive-stitching-parent - 23.7.0 + 23.11.0 pom 03-spring-boot-reactive-stitching @@ -39,4 +39,21 @@ server1 server2 + + + UTF-8 + UTF-8 + + + + + + maven-checkstyle-plugin + 3.3.0 + + ../../config/checkstyle.xml + + + + diff --git a/lilo-samples/04-spring-boot-reactive-stitching/server1/pom.xml b/lilo-samples/04-spring-boot-reactive-stitching/server1/pom.xml index 94fdf33..aedff87 100644 --- a/lilo-samples/04-spring-boot-reactive-stitching/server1/pom.xml +++ b/lilo-samples/04-spring-boot-reactive-stitching/server1/pom.xml @@ -9,7 +9,7 @@ org.springframework.boot spring-boot-starter-parent - 3.0.8 + 3.0.12 @@ -55,7 +55,7 @@ org.yaml snakeyaml - 2.0 + 2.2 @@ -76,6 +76,14 @@ org.springframework.boot spring-boot-maven-plugin + + + maven-checkstyle-plugin + 3.3.0 + + ../../../config/checkstyle.xml + + diff --git a/lilo-samples/04-spring-boot-reactive-stitching/server2/pom.xml b/lilo-samples/04-spring-boot-reactive-stitching/server2/pom.xml index 0758125..c4920d7 100644 --- a/lilo-samples/04-spring-boot-reactive-stitching/server2/pom.xml +++ b/lilo-samples/04-spring-boot-reactive-stitching/server2/pom.xml @@ -9,7 +9,7 @@ org.springframework.boot spring-boot-starter-parent - 3.0.8 + 3.0.12 @@ -55,7 +55,7 @@ org.yaml snakeyaml - 2.0 + 2.2 @@ -76,6 +76,14 @@ org.springframework.boot spring-boot-maven-plugin + + + maven-checkstyle-plugin + 3.3.0 + + ../../../config/checkstyle.xml + + diff --git a/lilo-samples/05-spring-boot-basic-authentication/.mvn/wrapper/maven-wrapper.properties b/lilo-samples/05-spring-boot-basic-authentication/.mvn/wrapper/maven-wrapper.properties index 687668b..39a584e 100644 --- a/lilo-samples/05-spring-boot-basic-authentication/.mvn/wrapper/maven-wrapper.properties +++ b/lilo-samples/05-spring-boot-basic-authentication/.mvn/wrapper/maven-wrapper.properties @@ -14,5 +14,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/lilo-samples/05-spring-boot-basic-authentication/lilo-gateway/pom.xml b/lilo-samples/05-spring-boot-basic-authentication/lilo-gateway/pom.xml index 2a85f88..e62485a 100644 --- a/lilo-samples/05-spring-boot-basic-authentication/lilo-gateway/pom.xml +++ b/lilo-samples/05-spring-boot-basic-authentication/lilo-gateway/pom.xml @@ -9,7 +9,7 @@ org.springframework.boot spring-boot-starter-parent - 3.0.8 + 3.0.12 @@ -39,20 +39,6 @@ - - - central - maven central - https://repo1.maven.org/maven2/ - - - - maven-atlassian-com - Atlassian Public Repository - https://packages.atlassian.com/maven/public - - - org.springframework.boot @@ -69,7 +55,7 @@ org.yaml snakeyaml - 2.0 + 2.2 @@ -81,13 +67,7 @@ io.fria lilo - 23.7.0 - - - - com.atlassian.braid - graphql-braid - 0.23.15 + 23.11.0 @@ -97,6 +77,14 @@ org.springframework.boot spring-boot-maven-plugin + + + maven-checkstyle-plugin + 3.3.0 + + ../../../config/checkstyle.xml + + diff --git a/lilo-samples/05-spring-boot-basic-authentication/pom.xml b/lilo-samples/05-spring-boot-basic-authentication/pom.xml index f96a2cf..15b8652 100644 --- a/lilo-samples/05-spring-boot-basic-authentication/pom.xml +++ b/lilo-samples/05-spring-boot-basic-authentication/pom.xml @@ -5,7 +5,7 @@ io.fria.lilo.samples.spring-boot-basic-authentication spring-boot-basic-authentication-parent - 23.7.0 + 23.11.0 pom 05-spring-boot-basic-authentication @@ -39,4 +39,21 @@ server1 server2 + + + UTF-8 + UTF-8 + + + + + + maven-checkstyle-plugin + 3.3.0 + + ../../config/checkstyle.xml + + + + diff --git a/lilo-samples/05-spring-boot-basic-authentication/server1/pom.xml b/lilo-samples/05-spring-boot-basic-authentication/server1/pom.xml index 0993e07..01e3396 100644 --- a/lilo-samples/05-spring-boot-basic-authentication/server1/pom.xml +++ b/lilo-samples/05-spring-boot-basic-authentication/server1/pom.xml @@ -9,7 +9,7 @@ org.springframework.boot spring-boot-starter-parent - 3.0.8 + 3.0.12 @@ -55,7 +55,7 @@ org.yaml snakeyaml - 2.0 + 2.2 @@ -81,6 +81,14 @@ org.springframework.boot spring-boot-maven-plugin + + + maven-checkstyle-plugin + 3.3.0 + + ../../../config/checkstyle.xml + + diff --git a/lilo-samples/05-spring-boot-basic-authentication/server2/pom.xml b/lilo-samples/05-spring-boot-basic-authentication/server2/pom.xml index 95020b2..178476e 100644 --- a/lilo-samples/05-spring-boot-basic-authentication/server2/pom.xml +++ b/lilo-samples/05-spring-boot-basic-authentication/server2/pom.xml @@ -9,7 +9,7 @@ org.springframework.boot spring-boot-starter-parent - 3.0.8 + 3.0.12 @@ -55,7 +55,7 @@ org.yaml snakeyaml - 2.0 + 2.2 @@ -81,6 +81,14 @@ org.springframework.boot spring-boot-maven-plugin + + + maven-checkstyle-plugin + 3.3.0 + + ../../../config/checkstyle.xml + + diff --git a/lilo-samples/pom.xml b/lilo-samples/pom.xml index b28bd62..173d5ed 100644 --- a/lilo-samples/pom.xml +++ b/lilo-samples/pom.xml @@ -6,7 +6,7 @@ io.fria.lilo.samples lilo-samples - 23.7.0 + 23.11.0 pom lilo-samples @@ -48,14 +48,14 @@ 17 17 17 - 3.3.9 + 3.6.3 UTF-8 UTF-8 - 2.0.7 - 5.9.2 + 2.0.9 + 5.10.1 2.18.0 - 10.9.3 - 4.7.3 + 10.12.4 + 4.8.1 @@ -83,12 +83,12 @@ maven-surefire-plugin - 3.0.0 + 3.2.2 maven-source-plugin - 3.2.1 + 3.3.0 attach-sources @@ -101,7 +101,7 @@ maven-enforcer-plugin - 3.2.1 + 3.4.1 enforce-versions @@ -124,7 +124,7 @@ maven-javadoc-plugin - 3.5.0 + 3.6.2 attach-sources @@ -137,7 +137,7 @@ maven-checkstyle-plugin - 3.2.1 + 3.3.0 com.puppycrawl.tools @@ -156,7 +156,7 @@ true true - config/checkstyle.xml + ../config/checkstyle.xml false **/module-info.java @@ -165,7 +165,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.7.3.3 + 4.8.1.0 com.github.spotbugs @@ -178,7 +178,7 @@ com.spotify.fmt fmt-maven-plugin - 2.19 + 2.21.1 diff --git a/pom.xml b/pom.xml index c549537..eea99d2 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.fria lilo - 23.7.0 + 23.11.0 lilo Lilo GraphQL stitching library @@ -36,24 +36,24 @@ - 11 + [11,12) 11 11 - 3.3.9 + 3.6.3 UTF-8 UTF-8 - 2.0.7 - 5.9.3 + 2.0.9 + 5.10.1 2.20.0 - 10.12.0 - 4.7.3 + 10.12.4 + 4.8.1 com.graphql-java graphql-java - 20.4 + 21.3 org.slf4j @@ -71,7 +71,7 @@ com.fasterxml.jackson.core jackson-databind - 2.15.2 + 2.15.3 @@ -91,7 +91,7 @@ org.mockito mockito-junit-jupiter - 5.4.0 + 5.7.0 test @@ -128,12 +128,12 @@ maven-surefire-plugin - 3.1.2 + 3.2.2 maven-enforcer-plugin - 3.3.0 + 3.4.1 enforce-versions @@ -169,7 +169,7 @@ maven-javadoc-plugin - 3.5.0 + 3.6.2 attach-sources @@ -224,7 +224,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.7.3.5 + 4.8.1.0 com.github.spotbugs @@ -237,7 +237,7 @@ com.spotify.fmt fmt-maven-plugin - 2.20 + 2.21.1 diff --git a/src/main/java/io/fria/lilo/error/SourceDataFetcherExceptionHandler.java b/src/main/java/io/fria/lilo/error/SourceDataFetcherExceptionHandler.java index 4526069..521ee80 100644 --- a/src/main/java/io/fria/lilo/error/SourceDataFetcherExceptionHandler.java +++ b/src/main/java/io/fria/lilo/error/SourceDataFetcherExceptionHandler.java @@ -20,22 +20,27 @@ import graphql.execution.DataFetcherExceptionHandlerResult; import graphql.execution.SimpleDataFetcherExceptionHandler; import java.util.List; +import java.util.concurrent.CompletableFuture; import org.jetbrains.annotations.NotNull; public class SourceDataFetcherExceptionHandler extends SimpleDataFetcherExceptionHandler { @Override - public @NotNull DataFetcherExceptionHandlerResult onException( + public @NotNull CompletableFuture handleException( final @NotNull DataFetcherExceptionHandlerParameters handlerParameters) { final Throwable exception = handlerParameters.getException(); if (exception instanceof SourceDataFetcherException) { - return DataFetcherExceptionHandlerResult.newResult() - .errors((List) ((SourceDataFetcherException) exception).getErrors()) - .build(); + + final DataFetcherExceptionHandlerResult result = + DataFetcherExceptionHandlerResult.newResult() + .errors((List) ((SourceDataFetcherException) exception).getErrors()) + .build(); + + return CompletableFuture.completedFuture(result); } - return super.onException(handlerParameters); + return super.handleException(handlerParameters); } }