From 255d3a6d82356763e8d7cf576da2bee8dbd512f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C4=B1rat=20K=C3=9C=C3=87=C3=9CK?= Date: Thu, 9 Nov 2023 10:12:51 +0100 Subject: [PATCH 1/9] Release 23.11.0 --- .github/workflows/pr-check.yml | 9 +++-- .mvn/wrapper/maven-wrapper.properties | 5 +-- README.md | 6 ++-- .../.mvn/wrapper/maven-wrapper.properties | 5 +-- .../lilo-gateway/pom.xml | 14 ++++++-- .../01-spring-boot-hello-world/pom.xml | 19 ++++++++++- .../server1/pom.xml | 12 +++++-- .../server2/pom.xml | 12 +++++-- .../.mvn/wrapper/maven-wrapper.properties | 4 +-- .../lilo-gateway/pom.xml | 34 ++++++------------- .../02-spring-boot-basic-stitching/pom.xml | 19 ++++++++++- .../server1/pom.xml | 12 +++++-- .../server2/pom.xml | 12 +++++-- .../.mvn/wrapper/maven-wrapper.properties | 5 +-- .../lilo-gateway/pom.xml | 34 ++++++------------- .../03-spring-boot-local-stitching/pom.xml | 19 ++++++++++- .../server1/pom.xml | 12 +++++-- .../.mvn/wrapper/maven-wrapper.properties | 4 +-- .../lilo-gateway/pom.xml | 14 ++++++-- .../04-spring-boot-reactive-stitching/pom.xml | 19 ++++++++++- .../server1/pom.xml | 12 +++++-- .../server2/pom.xml | 12 +++++-- .../.mvn/wrapper/maven-wrapper.properties | 4 +-- .../lilo-gateway/pom.xml | 34 ++++++------------- .../pom.xml | 19 ++++++++++- .../server1/pom.xml | 12 +++++-- .../server2/pom.xml | 12 +++++-- lilo-samples/pom.xml | 28 +++++++-------- pom.xml | 28 +++++++-------- .../SourceDataFetcherExceptionHandler.java | 15 +++++--- 30 files changed, 298 insertions(+), 148 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index ac1af1f..f942bd6 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -7,11 +7,11 @@ on: branches: [ main ] jobs: - build: + check-lilo: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK 11 uses: actions/setup-java@v3 @@ -21,4 +21,7 @@ jobs: cache: maven - name: Build with Maven - run: mvn -B -ntp package --file pom.xml + run: mvn -B -ntp package + + - name: Format Check + run: mvn -B -ntp com.spotify.fmt:fmt-maven-plugin:2.21.1:check diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 687668b..96c1d7e 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -14,5 +14,6 @@ # 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..62f3a63 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://github.com/friatech/lilo/actions/workflows/pr-check.yml/badge.svg?branch=main)](https://github.com/friatech/lilo/actions/workflows/pr-check.yml?query=branch%3Amain) + # Lilo ![Lilo and Stitch](resources/lilo-and-stitch.webp) @@ -16,7 +18,7 @@ Just add a single **Lilo** dependency to your `pom.xml` file. io.fria lilo - 23.7.0 + 23.11.0 ... @@ -25,7 +27,7 @@ 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 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..96c1d7e 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,6 @@ # 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..96c1d7e 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,6 @@ # 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..7d43869 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 @@ -39,21 +39,21 @@ 11 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); } } From 366874369bea4238baa060bc52ff8cfc3dd147e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C4=B1rat=20K=C3=9C=C3=87=C3=9CK?= Date: Thu, 9 Nov 2023 10:20:45 +0100 Subject: [PATCH 2/9] lilo-samples directory check --- .github/workflows/{pr-check.yml => ci.yml} | 21 ++++++++++++++++++++- README.md | 4 +--- 2 files changed, 21 insertions(+), 4 deletions(-) rename .github/workflows/{pr-check.yml => ci.yml} (51%) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/ci.yml similarity index 51% rename from .github/workflows/pr-check.yml rename to .github/workflows/ci.yml index f942bd6..0469649 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: PR Cheks +name: CI on: push: @@ -25,3 +25,22 @@ jobs: - 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 with Maven + run: cd lilo-samples && mvn -B -ntp package + + - name: Format Check + run: cd lilo-samples && mvn -B -ntp com.spotify.fmt:fmt-maven-plugin:2.21.1:check diff --git a/README.md b/README.md index 62f3a63..bc7b1b6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ -[![Build Status](https://github.com/friatech/lilo/actions/workflows/pr-check.yml/badge.svg?branch=main)](https://github.com/friatech/lilo/actions/workflows/pr-check.yml?query=branch%3Amain) - -# 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) ![Lilo and Stitch](resources/lilo-and-stitch.webp) From e65b107d0dec598103ce971b6a7ad11a1c117e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C4=B1rat=20K=C3=9C=C3=87=C3=9CK?= Date: Thu, 9 Nov 2023 10:23:02 +0100 Subject: [PATCH 3/9] cache local instance --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0469649..cccf48e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,6 +39,9 @@ jobs: distribution: 'temurin' cache: maven + - name: Build lilo and cache + run: mvn -B -ntp package install + - name: Build with Maven run: cd lilo-samples && mvn -B -ntp package From ae5e96b0cc84735285224e38b271e400abb9d458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C4=B1rat=20K=C3=9C=C3=87=C3=9CK?= Date: Thu, 9 Nov 2023 11:15:09 +0100 Subject: [PATCH 4/9] pipeline adjustment for lilo-samples compilation --- .github/workflows/ci.yml | 9 +++------ README.md | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cccf48e..dde2af3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,10 +40,7 @@ jobs: cache: maven - name: Build lilo and cache - run: mvn -B -ntp package install + run: mvn -B -ntp clean install -DskipTests=true -Dgpg.skip -Dcheckstyle.skip -Dmaven.javadoc.skip -Dmaven.source.skip - - name: Build with Maven - run: cd lilo-samples && mvn -B -ntp package - - - name: Format Check - run: cd lilo-samples && mvn -B -ntp com.spotify.fmt:fmt-maven-plugin:2.21.1:check + - 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/README.md b/README.md index bc7b1b6..7f338e5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 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) +# 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/) ![Lilo and Stitch](resources/lilo-and-stitch.webp) From 59104d5cdaf52d979fa0892c56ca691073e813f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C4=B1rat=20K=C3=9C=C3=87=C3=9CK?= Date: Thu, 9 Nov 2023 11:17:47 +0100 Subject: [PATCH 5/9] Apache 2 license badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f338e5..f181440 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 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/) +# 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) From c44f2347c5294a9820344fa47ef6efafe0140e6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C4=B1rat=20K=C3=9C=C3=87=C3=9CK?= Date: Thu, 9 Nov 2023 11:22:45 +0100 Subject: [PATCH 6/9] Some typos fixed --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index f181440..a6894ad 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ ![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 @@ -30,8 +30,8 @@ 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: From 3a5fe4cd9cfe185acee801020626a147c0bfe41c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C4=B1rat=20K=C3=9C=C3=87=C3=9CK?= Date: Thu, 9 Nov 2023 11:29:28 +0100 Subject: [PATCH 7/9] strict version limit --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7d43869..eea99d2 100644 --- a/pom.xml +++ b/pom.xml @@ -36,7 +36,7 @@ - 11 + [11,12) 11 11 3.6.3 From ee466d0bd97031b6d334003736489379ff47a0e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C4=B1rat=20K=C3=9C=C3=87=C3=9CK?= Date: Thu, 9 Nov 2023 11:32:37 +0100 Subject: [PATCH 8/9] skipping enforcer plugin on lilo-samples pipeline job --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dde2af3..7868269 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: cache: maven - name: Build lilo and cache - run: mvn -B -ntp clean install -DskipTests=true -Dgpg.skip -Dcheckstyle.skip -Dmaven.javadoc.skip -Dmaven.source.skip + 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 From 2338e147f742819699c88c79d3ef4700ac3a0898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C4=B1rat=20K=C3=9C=C3=87=C3=9CK?= Date: Thu, 9 Nov 2023 11:45:46 +0100 Subject: [PATCH 9/9] maven wrappers and editorconfig updated --- .editorconfig | 6 ++++++ .mvn/wrapper/maven-wrapper.properties | 1 - .../.mvn/wrapper/maven-wrapper.properties | 1 - .../.mvn/wrapper/maven-wrapper.properties | 1 - 4 files changed, 6 insertions(+), 3 deletions(-) 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/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 96c1d7e..39a584e 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -16,4 +16,3 @@ # under the License. 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/.mvn/wrapper/maven-wrapper.properties b/lilo-samples/01-spring-boot-hello-world/.mvn/wrapper/maven-wrapper.properties index 96c1d7e..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 @@ -16,4 +16,3 @@ # under the License. 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/.mvn/wrapper/maven-wrapper.properties b/lilo-samples/03-spring-boot-local-stitching/.mvn/wrapper/maven-wrapper.properties index 96c1d7e..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 @@ -16,4 +16,3 @@ # under the License. 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 -