Skip to content

Commit b180bdc

Browse files
author
Thomas Draier
committed
Upgrade to v4.2
1 parent e1ceb93 commit b180bdc

File tree

7 files changed

+144
-281
lines changed

7 files changed

+144
-281
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ gradle.projectsEvaluated {
6868

6969
dependencies {
7070
compile 'javax.validation:validation-api:1.1.0.Final'
71-
compile 'com.graphql-java:graphql-java:3.0.0'
71+
compile 'com.graphql-java:graphql-java:4.2'
7272

7373
// OSGi
7474
compileOnly 'org.osgi:org.osgi.core:6.0.0'

src/main/java/graphql/annotations/EnhancedExecutionStrategy.java

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

src/main/java/graphql/annotations/GraphQLAnnotations.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -843,8 +843,8 @@ public Object get(DataFetchingEnvironment environment) {
843843
HashMap<String, Object> arguments = new HashMap<>(environment.getArguments());
844844
arguments.keySet().removeAll(Arrays.asList("first", "last", "before", "after"));
845845
DataFetchingEnvironment env = new DataFetchingEnvironmentImpl(environment.getSource(), arguments, environment.getContext(),
846-
environment.getFields(), environment.getFieldType(), environment.getParentType(), environment.getGraphQLSchema(),
847-
environment.getFragmentsByName(), environment.getExecutionId(), environment.getSelectionSet());
846+
environment.getRoot(), environment.getFieldDefinition(), environment.getFields(), environment.getFieldType(), environment.getParentType(), environment.getGraphQLSchema(),
847+
environment.getFragmentsByName(), environment.getExecutionId(), environment.getSelectionSet(), environment.getFieldTypeInfo());
848848
Object data = actualDataFetcher.get(env);
849849
if (data != null) {
850850
Connection conn = constructNewInstance(constructor, data);

src/main/java/graphql/execution/TypeInfoWorkaround.java

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

src/test/java/graphql/annotations/GraphQLObjectTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ public void queryOptional() {
657657
GraphQLObjectType object = GraphQLAnnotations.object(OptionalTest.class);
658658
GraphQLSchema schema = newSchema().query(object).build();
659659

660-
GraphQL graphQL = GraphQL.newGraphQL(schema).queryExecutionStrategy(new EnhancedExecutionStrategy()).build();
660+
GraphQL graphQL = GraphQL.newGraphQL(schema).build();
661661
ExecutionResult result = graphQL.execute("{empty, nonempty}", new OptionalTest());
662662
assertTrue(result.getErrors().isEmpty());
663663
Map<String, Object> v = (Map<String, Object>) result.getData();
@@ -676,7 +676,7 @@ public void optionalInput() {
676676
}).build()).build();
677677
GraphQLSchema schema = newSchema().query(object).mutation(mutation).build();
678678

679-
GraphQL graphQL = GraphQL.newGraphQL(schema).queryExecutionStrategy(new EnhancedExecutionStrategy()).build();
679+
GraphQL graphQL = GraphQL.newGraphQL(schema).build();
680680
ExecutionResult result = graphQL.execute("mutation {test(input: {empty: \"test\"}) { empty nonempty } }", new OptionalTest());
681681
assertTrue(result.getErrors().isEmpty());
682682
Map<String, Object> v = (Map<String, Object>) ((Map<String, Object>) result.getData()).get("test");
@@ -707,7 +707,7 @@ public String toString() {
707707
public void queryEnum() {
708708
GraphQLObjectType object = GraphQLAnnotations.object(EnumTest.class);
709709
GraphQLSchema schema = newSchema().query(object).build();
710-
GraphQL graphQL = GraphQL.newGraphQL(schema).queryExecutionStrategy(new EnhancedExecutionStrategy()).build();
710+
GraphQL graphQL = GraphQL.newGraphQL(schema).build();
711711

712712
ExecutionResult result = graphQL.execute("{e}", new EnumTest(EnumTest.E.B));
713713
assertTrue(result.getErrors().isEmpty());

src/test/java/graphql/annotations/MethodDataFetcherTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public String method() throws TestException {
4040
public void exceptionRethrowing() {
4141
try {
4242
MethodDataFetcher methodDataFetcher = new MethodDataFetcher(getClass().getMethod("method"));
43-
methodDataFetcher.get(new DataFetchingEnvironmentImpl(this, new HashMap<>(), null, new ArrayList<>(), null, null, null, null, null, null));
43+
methodDataFetcher.get(new DataFetchingEnvironmentImpl(this, new HashMap<String,Object>(), null, null, null, new ArrayList<>(), null, null, null, null, null, null, null));
4444
} catch (NoSuchMethodException e) {
4545
e.printStackTrace();
4646
}

0 commit comments

Comments
 (0)