Skip to content

feat: add the GraphQL WebSocket server (G4, graphql-transport-ws) - #1593

Open
jlouvel wants to merge 3 commits into
feat/graphql-g3-ssefrom
feat/graphql-g4-websocket-server
Open

jlouvel wants to merge 3 commits into
feat/graphql-g3-ssefrom
feat/graphql-g4-websocket-server

fix: harden the GraphQL WebSocket server lifecycle

63ed523
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Oct 31, 2026 in 1m 0s

Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check warning on line 133 in org.restlet.ext.graphql/src/main/java/org/restlet/ext/graphql/GraphqlWebSocketSupport.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor the code in order to not assign to this loop counter from within the loop body.

See more on https://sonarcloud.io/project/issues?id=restlet_restlet-framework-java&issues=AaGQnYWZ7JDpWu2qo3WG&open=AaGQnYWZ7JDpWu2qo3WG&pullRequest=1593

Check failure on line 298 in org.restlet.ext.graphql/src/main/java/org/restlet/ext/graphql/GraphqlWebSocketSupport.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "operationName" 3 times.

See more on https://sonarcloud.io/project/issues?id=restlet_restlet-framework-java&issues=AaGKvuXAtx7VWA3xISLj&open=AaGKvuXAtx7VWA3xISLj&pullRequest=1593

Check failure on line 274 in org.restlet.ext.graphql/src/main/java/org/restlet/ext/graphql/GraphqlWebSocketSupport.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "complete" 3 times.

See more on https://sonarcloud.io/project/issues?id=restlet_restlet-framework-java&issues=AaGKvuXAtx7VWA3xISLk&open=AaGKvuXAtx7VWA3xISLk&pullRequest=1593

Check warning on line 475 in org.restlet.ext.graphql/src/main/java/org/restlet/ext/graphql/GraphqlWebSocketSupport.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the record pattern instead of this pattern match variable.

See more on https://sonarcloud.io/project/issues?id=restlet_restlet-framework-java&issues=AaGKvuXAtx7VWA3xISLm&open=AaGKvuXAtx7VWA3xISLm&pullRequest=1593

Check failure on line 429 in org.restlet.ext.graphql/src/main/java/org/restlet/ext/graphql/GraphqlServerAdapter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 29 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=restlet_restlet-framework-java&issues=AaGKvuYztx7VWA3xISLq&open=AaGKvuYztx7VWA3xISLq&pullRequest=1593

Check warning on line 223 in org.restlet.ext.graphql/src/main/java/org/restlet/ext/graphql/GraphqlWebSocketSupport.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either re-interrupt this method or rethrow the "InterruptedException" that can be caught here.

See more on https://sonarcloud.io/project/issues?id=restlet_restlet-framework-java&issues=AaGKvuXAtx7VWA3xISLl&open=AaGKvuXAtx7VWA3xISLl&pullRequest=1593

Check warning on line 103 in org.restlet.ext.graphql/src/test/java/org/restlet/ext/graphql/GraphqlWebSocketServerTestCase.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this use of "Thread.sleep()".

See more on https://sonarcloud.io/project/issues?id=restlet_restlet-framework-java&issues=AaGKvuY7tx7VWA3xISLr&open=AaGKvuY7tx7VWA3xISLr&pullRequest=1593

Check failure on line 236 in org.restlet.ext.graphql/src/main/java/org/restlet/ext/graphql/GraphqlWebSocketSupport.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 18 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=restlet_restlet-framework-java&issues=AaGQnYWZ7JDpWu2qo3WI&open=AaGQnYWZ7JDpWu2qo3WI&pullRequest=1593

Check warning on line 158 in org.restlet.ext.graphql/src/main/java/org/restlet/ext/graphql/internal/GraphqlEventStream.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename "subscriber" which hides the field declared at line 52.

See more on https://sonarcloud.io/project/issues?id=restlet_restlet-framework-java&issues=AaGKvuYrtx7VWA3xISLn&open=AaGKvuYrtx7VWA3xISLn&pullRequest=1593

Check warning on line 176 in org.restlet.ext.graphql/src/main/java/org/restlet/ext/graphql/internal/GraphqlEventStream.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the record pattern instead of this pattern match variable.

See more on https://sonarcloud.io/project/issues?id=restlet_restlet-framework-java&issues=AaGKvuYrtx7VWA3xISLp&open=AaGKvuYrtx7VWA3xISLp&pullRequest=1593

Check failure on line 145 in org.restlet.ext.graphql/src/main/java/org/restlet/ext/graphql/GraphqlWebSocketSupport.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "payload" 5 times.

See more on https://sonarcloud.io/project/issues?id=restlet_restlet-framework-java&issues=AaGKvuW_tx7VWA3xISLi&open=AaGKvuW_tx7VWA3xISLi&pullRequest=1593

Check failure on line 418 in org.restlet.ext.graphql/src/main/java/org/restlet/ext/graphql/GraphqlWebSocketSupport.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "error" 4 times.

See more on https://sonarcloud.io/project/issues?id=restlet_restlet-framework-java&issues=AaGQnYWZ7JDpWu2qo3WH&open=AaGQnYWZ7JDpWu2qo3WH&pullRequest=1593

Check warning on line 369 in org.restlet.ext.graphql/src/test/java/org/restlet/ext/graphql/GraphqlWebSocketServerTestCase.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use assertNotNull instead.

See more on https://sonarcloud.io/project/issues?id=restlet_restlet-framework-java&issues=AaGKvuY7tx7VWA3xISLt&open=AaGKvuY7tx7VWA3xISLt&pullRequest=1593

Check warning on line 325 in org.restlet.ext.graphql/src/test/java/org/restlet/ext/graphql/GraphqlWebSocketServerTestCase.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor the code of the lambda to have only one invocation possibly throwing a runtime exception.

See more on https://sonarcloud.io/project/issues?id=restlet_restlet-framework-java&issues=AaGKvuY7tx7VWA3xISLs&open=AaGKvuY7tx7VWA3xISLs&pullRequest=1593

Check warning on line 173 in org.restlet.ext.graphql/src/main/java/org/restlet/ext/graphql/internal/GraphqlEventStream.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace the chain of if/else with a switch expression.

See more on https://sonarcloud.io/project/issues?id=restlet_restlet-framework-java&issues=AaGKvuYrtx7VWA3xISLo&open=AaGKvuYrtx7VWA3xISLo&pullRequest=1593