Skip to content

Commit 8418d91

Browse files
ryangardnerapottere
authored andcommitted
Update to work with graphql-java 8.0 (#72)
* Update to graphql-java 8.0 - Fix issue with the missing "NoOpInstrumentation" - Update the test dependency on the graphql annotations to fix issue with the OSGI test * update test dependency for the annotations to match it's new coordinates
1 parent 184025b commit 8418d91

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ dependencies {
5555
compile 'commons-fileupload:commons-fileupload:1.3.1'
5656

5757
// GraphQL
58-
compile 'com.graphql-java:graphql-java:6.0'
58+
compile 'com.graphql-java:graphql-java:8.0'
5959

60-
testCompile 'com.graphql-java:graphql-java-annotations:0.13.1'
60+
testCompile 'io.github.graphql-java:graphql-java-annotations:5.2'
6161

6262
// JSON
6363
compile 'com.fasterxml.jackson.core:jackson-core:2.8.4'
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Apr 24 13:12:01 EDT 2017
1+
#Wed Apr 25 17:03:16 EDT 2018
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package graphql.servlet;
22

33
import graphql.execution.instrumentation.Instrumentation;
4-
import graphql.execution.instrumentation.NoOpInstrumentation;
4+
import graphql.execution.instrumentation.SimpleInstrumentation;
55

66
public class NoOpInstrumentationProvider implements InstrumentationProvider {
77

88
@Override
99
public Instrumentation getInstrumentation() {
10-
return NoOpInstrumentation.INSTANCE;
10+
return SimpleInstrumentation.INSTANCE;
1111
}
1212
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import graphql.execution.ExecutionStrategy;
44
import graphql.execution.instrumentation.Instrumentation;
5-
import graphql.execution.instrumentation.NoOpInstrumentation;
5+
import graphql.execution.instrumentation.SimpleInstrumentation;
66
import graphql.execution.preparsed.NoOpPreparsedDocumentProvider;
77
import graphql.execution.preparsed.PreparsedDocumentProvider;
88
import graphql.schema.GraphQLSchema;
@@ -60,7 +60,7 @@ public SimpleGraphQLServlet(GraphQLSchemaProvider schemaProvider, ExecutionStrat
6060
this.executionStrategyProvider = executionStrategyProvider;
6161

6262
if (instrumentation == null) {
63-
this.instrumentation = NoOpInstrumentation.INSTANCE;
63+
this.instrumentation = SimpleInstrumentation.INSTANCE;
6464
} else {
6565
this.instrumentation = instrumentation;
6666
}
@@ -131,7 +131,7 @@ public static class Builder {
131131
private ExecutionStrategyProvider executionStrategyProvider = new DefaultExecutionStrategyProvider();
132132
private ObjectMapperConfigurer objectMapperConfigurer;
133133
private List<GraphQLServletListener> listeners;
134-
private Instrumentation instrumentation = NoOpInstrumentation.INSTANCE;
134+
private Instrumentation instrumentation = SimpleInstrumentation.INSTANCE;
135135
private GraphQLErrorHandler errorHandler = new DefaultGraphQLErrorHandler();
136136
private GraphQLContextBuilder contextBuilder = new DefaultGraphQLContextBuilder();
137137
private GraphQLRootObjectBuilder rootObjectBuilder = new DefaultGraphQLRootObjectBuilder();

src/test/groovy/graphql/servlet/OsgiGraphQLServletSpec.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package graphql.servlet
22

3-
import graphql.annotations.GraphQLAnnotations
4-
import graphql.annotations.GraphQLField
5-
import graphql.annotations.GraphQLName
3+
import graphql.annotations.annotationTypes.GraphQLField
4+
import graphql.annotations.annotationTypes.GraphQLName
5+
import graphql.annotations.processor.GraphQLAnnotations
66
import graphql.schema.GraphQLFieldDefinition
77
import spock.lang.Specification
88

0 commit comments

Comments
 (0)