Skip to content

Commit 3301e0f

Browse files
Thomas Draierapottere
authored andcommitted
Removed dependency to old version of graphql-java-annotations (#52)
1 parent 73ed981 commit 3301e0f

6 files changed

Lines changed: 2 additions & 177 deletions

File tree

build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ dependencies {
5757
// GraphQL
5858
compile 'com.graphql-java:graphql-java:6.0'
5959

60-
compileOnly 'com.graphql-java:graphql-java-annotations:0.13.1'
6160
testCompile 'com.graphql-java:graphql-java-annotations:0.13.1'
6261

6362
// JSON

src/main/java/graphql/servlet/GraphQLServlet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public abstract class GraphQLServlet extends HttpServlet implements Servlet, Gra
6666
protected abstract Object createRootObject(Optional<HttpServletRequest> request, Optional<HttpServletResponse> response);
6767
protected abstract ExecutionStrategyProvider getExecutionStrategyProvider();
6868
protected abstract Instrumentation getInstrumentation();
69-
protected abstract Map<String, Object> transformVariables(GraphQLSchema schema, String query, Map<String, Object> variables);
69+
7070
protected abstract GraphQLErrorHandler getGraphQLErrorHandler();
7171
protected abstract PreparsedDocumentProvider getPreparsedDocumentProvider();
7272

@@ -335,7 +335,7 @@ private void query(String query, String operationName, Map<String, Object> varia
335335
} else {
336336
List<GraphQLServletListener.OperationCallback> operationCallbacks = runListeners(l -> l.onOperation(context, operationName, query, variables));
337337

338-
final ExecutionResult executionResult = newGraphQL(schema).execute(new ExecutionInput(query, operationName, context, rootObject, transformVariables(schema, query, variables)));
338+
final ExecutionResult executionResult = newGraphQL(schema).execute(new ExecutionInput(query, operationName, context, rootObject, variables));
339339
final List<GraphQLError> errors = executionResult.getErrors();
340340
final Object data = executionResult.getData();
341341

src/main/java/graphql/servlet/GraphQLVariables.java

Lines changed: 0 additions & 64 deletions
This file was deleted.

src/main/java/graphql/servlet/OsgiGraphQLServlet.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import graphql.execution.preparsed.NoOpPreparsedDocumentProvider;
55
import graphql.execution.preparsed.PreparsedDocumentProvider;
66
import graphql.schema.GraphQLObjectType;
7-
import graphql.schema.GraphQLSchema;
87
import graphql.schema.GraphQLType;
98
import org.osgi.service.component.annotations.*;
109

@@ -13,7 +12,6 @@
1312
import java.util.ArrayList;
1413
import java.util.HashSet;
1514
import java.util.List;
16-
import java.util.Map;
1715
import java.util.Optional;
1816
import java.util.Set;
1917

@@ -210,11 +208,6 @@ protected Instrumentation getInstrumentation() {
210208
return instrumentationProvider.getInstrumentation();
211209
}
212210

213-
@Override
214-
protected Map<String, Object> transformVariables(GraphQLSchema schema, String query, Map<String, Object> variables) {
215-
return new GraphQLVariables(schema, query, variables);
216-
}
217-
218211
@Override
219212
protected GraphQLErrorHandler getGraphQLErrorHandler() {
220213
return errorHandler;

src/main/java/graphql/servlet/SimpleGraphQLServlet.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import javax.servlet.http.HttpServletRequest;
1111
import javax.servlet.http.HttpServletResponse;
1212
import java.util.List;
13-
import java.util.Map;
1413
import java.util.Optional;
1514

1615
/**
@@ -104,11 +103,6 @@ protected Instrumentation getInstrumentation() {
104103
return instrumentation;
105104
}
106105

107-
@Override
108-
protected Map<String, Object> transformVariables(GraphQLSchema schema, String query, Map<String, Object> variables) {
109-
return variables;
110-
}
111-
112106
@Override
113107
protected GraphQLErrorHandler getGraphQLErrorHandler() {
114108
return errorHandler;

src/test/groovy/graphql/servlet/GraphQLVariablesSpec.groovy

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)