Skip to content

fix: downgrade to javax and JDK11 #509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
e73fe9d
Update version for release
actions-user Aug 17, 2022
b4ef192
chore: update supported graphql-java version in readme
oliemansm Aug 17, 2022
7940833
Merge remote-tracking branch 'origin/master'
oliemansm Aug 17, 2022
1945f5a
fix(deps): update lib_slf4j_ver to v2
renovate[bot] Aug 20, 2022
a829f89
Merge pull request #472 from graphql-java-kickstart/renovate/major-li…
oliemansm Aug 23, 2022
4c429a7
fix(deps): update dependency com.fasterxml.jackson.core:jackson-datab…
renovate[bot] Sep 3, 2022
12301ae
fix(deps): update lib_jackson_ver to v2.13.4
renovate[bot] Sep 4, 2022
3e3a796
fix(deps): update dependency com.graphql-java:graphql-java to v19.2
renovate[bot] Sep 7, 2022
7784179
fix(deps): update spring core to v5.3.23
renovate[bot] Sep 15, 2022
81363db
fix(deps): update lib_slf4j_ver to v2.0.1
renovate[bot] Sep 15, 2022
2575e44
fix(deps): update dependency org.codehaus.groovy:groovy-all to v3.0.13
renovate[bot] Sep 18, 2022
f3566d0
Merge pull request #480 from graphql-java-kickstart/renovate/groovy-m…
oliemansm Sep 18, 2022
017ef35
Merge pull request #476 from graphql-java-kickstart/renovate/lib_grap…
oliemansm Sep 18, 2022
51a10cf
fix(deps): update lib_slf4j_ver to v2.0.2
renovate[bot] Sep 20, 2022
9664d02
chore(deps): bump jackson-databind
dependabot[bot] Oct 19, 2022
42133fa
Merge pull request #483 from graphql-java-kickstart/dependabot/maven/…
oliemansm Nov 14, 2022
e76fa67
javax.servlet -> jakarta.servlet:6.0
eduarddrenth Nov 15, 2022
2e8b812
jdk 8 -> jdk 11
eduarddrenth Nov 17, 2022
4a6ff24
jdk 8 => jdk 11
eduarddrenth Nov 18, 2022
b87e5c1
chore: update java to v17
oliemansm Dec 2, 2022
91022aa
Merge remote-tracking branch 'origin/master'
oliemansm Dec 2, 2022
6c312cc
jdk17
eduarddrenth Dec 2, 2022
73b0535
Merge remote-tracking branch 'upstream/master'
eduarddrenth Dec 2, 2022
12055b0
fix tests, just call init() without arg instead of init(null)
eduarddrenth Dec 2, 2022
d293821
chore: javax.servlet -> jakarta.servlet:6.0
eduarddrenth Nov 15, 2022
a073ad8
chore: jdk 8 => jdk 11
eduarddrenth Nov 17, 2022
850ea73
chore: update jdk to v17
eduarddrenth Dec 2, 2022
9ed1ee7
chore: update java to v17
oliemansm Dec 2, 2022
8941702
chore: fix tests, just call init() without arg instead of init(null)
eduarddrenth Dec 2, 2022
0572b68
chore: add jdk 19 and replace jdk 11
oliemansm Dec 5, 2022
391fdd6
Merge branch 'master' into feature/484-upgrade-servlet-spec
oliemansm Dec 5, 2022
3842220
chore(deps): update gradle to v7.6
oliemansm Dec 5, 2022
9b5584d
Merge pull request #489 from graphql-java-kickstart/feature/484-upgra…
oliemansm Dec 5, 2022
4ebc257
chore(deps): update all non-major dependencies
renovate[bot] Dec 5, 2022
e3a597b
Merge pull request #482 from graphql-java-kickstart/renovate/all-mino…
oliemansm Dec 5, 2022
1508d77
Update version for release
actions-user Dec 5, 2022
265ecdf
Update version for release
actions-user Dec 5, 2022
80f0537
chore: re-interrupt http request thread
oliemansm Dec 5, 2022
771de63
Merge remote-tracking branch 'origin/master'
oliemansm Dec 5, 2022
a3075a6
Merge remote-tracking branch 'upstream/master'
eduarddrenth Dec 6, 2022
c180ab3
docs
eduarddrenth Dec 6, 2022
92e720d
docs
eduarddrenth Dec 6, 2022
5b2cdf2
docs
eduarddrenth Dec 6, 2022
f04da54
Merge remote-tracking branch 'origin/master'
eduarddrenth Dec 6, 2022
10ebfe2
Merge pull request #491 from fryske-akademy/master
oliemansm Dec 6, 2022
f28b00b
fix(deps): update all non-major dependencies to v2.0.6
renovate[bot] Dec 12, 2022
a765a9e
fix(deps): update all non-major dependencies to v6.0.3
renovate[bot] Dec 15, 2022
827092e
fix(deps): update all non-major dependencies to v1.5.1
renovate[bot] Dec 20, 2022
94536ce
fix(deps): update dependency org.apache.groovy:groovy-all to v4.0.7
renovate[bot] Dec 24, 2022
ad051d9
fix(deps): update all non-major dependencies to v6.0.4
renovate[bot] Jan 11, 2023
483c007
fix(deps): update dependency org.apache.groovy:groovy-all to v4.0.8
renovate[bot] Jan 22, 2023
cacd67d
fix(deps): update all non-major dependencies to v2.14.2
renovate[bot] Jan 29, 2023
cfbdba1
fix(deps): update dependency org.projectlombok:lombok to v1.18.26
renovate[bot] Feb 3, 2023
09747cf
fix(deps): update dependency org.apache.groovy:groovy-all to v4.0.9
renovate[bot] Feb 9, 2023
132e0bd
fix(deps): update all non-major dependencies to v6.0.5
renovate[bot] Feb 15, 2023
685227f
chore(deps): update plugin org.sonarqube to v4
renovate[bot] Feb 17, 2023
6a9c6c1
Merge pull request #506 from graphql-java-kickstart/renovate/org.sona…
oliemansm Mar 13, 2023
47b2ad6
chore(deps): update dependency gradle to v8
renovate[bot] Mar 13, 2023
d1a5f88
Merge pull request #504 from graphql-java-kickstart/renovate/gradle-8.x
oliemansm Mar 13, 2023
34a03ff
chore(deps): update all non-major dependencies
renovate[bot] Mar 13, 2023
c9b00eb
Merge pull request #507 from graphql-java-kickstart/renovate/all-mino…
oliemansm Mar 14, 2023
76fb7bd
fix(deps): update graphql-java to v20.0.0
federicorispo Feb 11, 2023
592c6bc
fix: linting
federicorispo Feb 12, 2023
f84cbde
Merge pull request #503 from federicorispo/fix/bump-graphql-java-depe…
oliemansm Mar 14, 2023
31471c1
fix: Downgrade to javax and JDK11
federicorispo Feb 11, 2023
25a09d8
fix(deps): update all non-major dependencies to v2.0.7
renovate[bot] Mar 18, 2023
369eaf2
fix(deps): update all non-major dependencies to v6.0.7
renovate[bot] Mar 20, 2023
4477bb9
fix(deps): update dependency com.graphql-java:graphql-java to v20.1
renovate[bot] Mar 22, 2023
8413d85
Merge pull request #512 from graphql-java-kickstart/renovate/all-mino…
oliemansm Mar 30, 2023
3ea58a0
chore(deps): bump jackson-databind
dependabot[bot] Mar 31, 2023
851cacf
chore(deps): update all non-major dependencies
renovate[bot] Apr 24, 2023
20c6d64
Merge pull request #514 from graphql-java-kickstart/dependabot/maven/…
oliemansm May 5, 2023
18dae2a
Merge pull request #513 from graphql-java-kickstart/renovate/all-mino…
oliemansm May 5, 2023
8cdcfe2
fix(deps): update dependency org.apache.groovy:groovy-all to v4.0.12
renovate[bot] May 8, 2023
a42db87
chore: optimize release process
oliemansm May 8, 2023
c11dbd5
chore: remove old release script
oliemansm May 8, 2023
b974ea9
chore: revert publish release jdk versions
oliemansm May 8, 2023
ca50c17
feat: add snapshot suffix workflow
oliemansm May 8, 2023
6a0b786
Merge pull request #518 from graphql-java-kickstart/renovate/all-mino…
oliemansm May 8, 2023
a938d66
fix(#516): add origin check to websockets
oliemansm May 9, 2023
060f753
fix(#516): add check origin tests
oliemansm May 9, 2023
b25975b
Merge pull request #519 from graphql-java-kickstart/feature/516-webso…
oliemansm May 9, 2023
d947467
chore: update version to 15.1.0
oliemansm May 9, 2023
f02694d
fix(#516): revert check origin test
oliemansm May 10, 2023
ebbd814
feat: limit scope of servlet-api libs
oliemansm May 10, 2023
995e9ba
Merge pull request #520 from graphql-java-kickstart/490-consider-maki…
oliemansm May 10, 2023
57e6437
chore: merge branch 'master'
federicorispo May 10, 2023
9565ede
chore: merge remote-tracking branch 'original/javax'
federicorispo May 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/tag-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ echo "Deploying release to Maven Central"
removeSnapshots
commitRelease
bumpVersion
git push --follow-tags
git push --follow-tags
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
java: [ 8, 11, 15 ]
java: [ 11 ]
needs: validation
runs-on: ${{ matrix.os }}
steps:
Expand Down
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# GraphQL Java Servlet
# GraphQL Java Servlet 14
[![Maven Central](https://img.shields.io/maven-central/v/com.graphql-java-kickstart/graphql-java-servlet.svg)](https://maven-badges.herokuapp.com/maven-central/com.graphql-java-kickstart/graphql-java-servlet)
[![Build Status](https://github.com/graphql-java-kickstart/graphql-java-servlet/workflows/Publish%20snapshot/badge.svg)](https://github.com/graphql-java-kickstart/graphql-java-servlet/actions?query=workflow%3A%22Publish+snapshot%22)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=graphql-java-kickstart_graphql-java-servlet&metric=alert_status)](https://sonarcloud.io/dashboard?id=graphql-java-kickstart_graphql-java-servlet)
Expand All @@ -19,10 +19,17 @@ This project wraps the Java implementation of GraphQL provided by [GraphQL Java]
See [GraphQL Java documentation](https://www.graphql-java.com/documentation/latest/) for more in depth details
regarding GraphQL Java itself.

We try to stay up to date with GraphQL Java as much as possible. The current version supports
**GraphQL Java 17.3**.

This project requires at least Java 8.
We try to stay up to date with GraphQL Java as much as possible maintaining the retro-compatibility
with Springframework 5.

The `14.*` version must be used if your project is based on Spring version <= `5`,
or it is using javax-servlet-api dependency and cannot be upgraded to jakarta.

It also supports legacy projects that can compile with older JDK versions: the oldest supported one
is the `11`.


See [gradle.properties](gradle.properties) to see currently supported versions.

## Installation and getting started

Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ buildscript {
}

plugins {
id "biz.aQute.bnd.builder" version "6.3.1" apply false
id "org.sonarqube" version "3.4.0.2513"
id "biz.aQute.bnd.builder" version "6.4.0" apply false
id "org.sonarqube" version "4.0.0.2929"
id "jacoco"
id "io.github.gradle-nexus.publish-plugin" version '1.1.0'
id "io.github.gradle-nexus.publish-plugin" version '1.3.0'
}

sonarqube {
Expand Down
2 changes: 1 addition & 1 deletion examples/osgi/apache-karaf-feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
</parent>

<properties>
<jackson.version>2.12.6.1</jackson.version>
<jackson.version>2.13.4.2</jackson.version>
</properties>

</project>
4 changes: 2 additions & 2 deletions examples/osgi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<graphql.java.servlet.version>11.0.0-SNAPSHOT</graphql.java.servlet.version>
<graphql.java.version>16.1</graphql.java.version>
<karaf.version>4.2.10</karaf.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
u <maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

<version>10.1.0</version>
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
19 changes: 12 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,13 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -143,12 +140,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
1 change: 1 addition & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand Down
2 changes: 1 addition & 1 deletion graphql-java-kickstart/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ dependencies {
// JSON
api "com.fasterxml.jackson.core:jackson-core:$LIB_JACKSON_VER"
api "com.fasterxml.jackson.core:jackson-annotations:$LIB_JACKSON_VER"
api "com.fasterxml.jackson.core:jackson-databind:2.13.3"
api "com.fasterxml.jackson.core:jackson-databind:2.15.0"
api "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$LIB_JACKSON_VER"
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public static class Builder {

private Supplier<ExecutionStrategyProvider> getExecutionStrategyProvider =
DefaultExecutionStrategyProvider::new;
private Supplier<Instrumentation> getInstrumentation = () -> SimplePerformantInstrumentation.INSTANCE;
private Supplier<Instrumentation> getInstrumentation =
() -> SimplePerformantInstrumentation.INSTANCE;
private Supplier<PreparsedDocumentProvider> getPreparsedDocumentProvider =
() -> NoOpPreparsedDocumentProvider.INSTANCE;
private Supplier<DataLoaderDispatcherInstrumentationOptions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public class GraphQLBuilder {
() -> NoOpPreparsedDocumentProvider.INSTANCE;

@Getter
private Supplier<Instrumentation> instrumentationSupplier = () -> SimplePerformantInstrumentation.INSTANCE;
private Supplier<Instrumentation> instrumentationSupplier =
() -> SimplePerformantInstrumentation.INSTANCE;

private Supplier<GraphQLBuilderConfigurer> graphQLBuilderConfigurerSupplier = () -> builder -> {};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ public InstrumentationState createState(InstrumentationCreateStateParameters par
}

@Override
public DataFetcher<?> instrumentDataFetcher(DataFetcher<?> dataFetcher,
InstrumentationFieldFetchParameters parameters, InstrumentationState instrumentationState) {
DataLoaderDispatcherInstrumentationState state = InstrumentationState.ofState(
instrumentationState);
public DataFetcher<?> instrumentDataFetcher(
DataFetcher<?> dataFetcher,
InstrumentationFieldFetchParameters parameters,
InstrumentationState instrumentationState) {
DataLoaderDispatcherInstrumentationState state =
InstrumentationState.ofState(instrumentationState);
if (state.isAggressivelyBatching()) {
return dataFetcher;
}
Expand All @@ -92,8 +94,8 @@ public InstrumentationContext<ExecutionResult> beginExecuteOperation(
InstrumentationExecuteOperationParameters parameters,
InstrumentationState instrumentationState) {
if (!isDataLoaderCompatible(parameters.getExecutionContext())) {
DataLoaderDispatcherInstrumentationState state = InstrumentationState.ofState(
instrumentationState);
DataLoaderDispatcherInstrumentationState state =
InstrumentationState.ofState(instrumentationState);
state.setAggressivelyBatching(false);
}
return SimpleInstrumentationContext.noOp();
Expand All @@ -117,8 +119,8 @@ private boolean isDataLoaderCompatible(ExecutionContext executionContext) {
public ExecutionStrategyInstrumentationContext beginExecutionStrategy(
InstrumentationExecutionStrategyParameters parameters,
InstrumentationState instrumentationState) {
DataLoaderDispatcherInstrumentationState state = InstrumentationState.ofState(
instrumentationState);
DataLoaderDispatcherInstrumentationState state =
InstrumentationState.ofState(instrumentationState);
//
// if there are no data loaders, there is nothing to do
//
Expand All @@ -141,8 +143,8 @@ public void onCompleted(ExecutionResult result, Throwable t) {
@Override
public InstrumentationContext<Object> beginFieldFetch(
InstrumentationFieldFetchParameters parameters, InstrumentationState instrumentationState) {
DataLoaderDispatcherInstrumentationState state = InstrumentationState.ofState(
instrumentationState);
DataLoaderDispatcherInstrumentationState state =
InstrumentationState.ofState(instrumentationState);
//
// if there are no data loaders, there is nothing to do
//
Expand All @@ -154,10 +156,11 @@ public InstrumentationContext<Object> beginFieldFetch(

@Override
public CompletableFuture<ExecutionResult> instrumentExecutionResult(
ExecutionResult executionResult, InstrumentationExecutionParameters parameters,
ExecutionResult executionResult,
InstrumentationExecutionParameters parameters,
InstrumentationState instrumentationState) {
DataLoaderDispatcherInstrumentationState state = InstrumentationState.ofState(
instrumentationState);
DataLoaderDispatcherInstrumentationState state =
InstrumentationState.ofState(instrumentationState);
state.getApproach().removeTracking(parameters.getExecutionInput().getExecutionId());
if (!options.isIncludeStatistics()) {
return CompletableFuture.completedFuture(executionResult);
Expand Down
6 changes: 4 additions & 2 deletions graphql-java-servlet/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies {
// Servlet
compileOnly 'javax.servlet:javax.servlet-api:4.0.1'
compileOnly 'javax.websocket:javax.websocket-api:1.1'
compileOnly 'javax.websocket:javax.websocket-client-api:1.1'
implementation "org.slf4j:slf4j-api:$LIB_SLF4J_VER"

// OSGi
Expand All @@ -36,9 +37,10 @@ dependencies {
testRuntimeOnly "cglib:cglib-nodep:3.3.0"
testRuntimeOnly "org.objenesis:objenesis:3.3"
testImplementation "org.slf4j:slf4j-simple:$LIB_SLF4J_VER"
testImplementation 'org.springframework:spring-test:5.3.22'
testRuntimeOnly 'org.springframework:spring-web:5.3.22'
testImplementation 'org.springframework:spring-test:5.3.25'
testRuntimeOnly 'org.springframework:spring-web:5.3.25'
testImplementation 'com.google.guava:guava:31.1-jre'
testImplementation 'javax.servlet:javax.servlet-api:4.0.1'
testImplementation 'javax.websocket:javax.websocket-api:1.1'
testImplementation 'javax.websocket:javax.websocket-client-api:1.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ private void handle(
response.setStatus(STATUS_INTERNAL_SERVER_ERROR);
log.error("Cannot handle http request", e);
listenerHandler.onError(e);
if (e instanceof InterruptedException) {
Thread.currentThread().interrupt();
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ b
throw new TestException()
}.build()).build()
servlet = GraphQLHttpServlet.with(configuration)
servlet.init(null)
servlet.init()

request.setPathInfo('/schema.json')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class TestUtils {
.with(contextBuilder)
.with(executor())
.build())
servlet.init(null)
servlet.init()
return servlet
}

Expand All @@ -86,7 +86,7 @@ class TestUtils {
listeners
)
)
servlet.init(null)
servlet.init()
return servlet
}

Expand Down