Skip to content

Updating to use latest graphql-java:16.2 library #270

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ gradle.projectsEvaluated {

dependencies {
compile 'javax.validation:validation-api:1.1.0.Final'
compile 'com.graphql-java:graphql-java:15.0'
compile 'com.graphql-java:graphql-java:16.2'

// OSGi
compileOnly 'org.osgi:org.osgi.core:6.0.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ protected CompletableFuture<ExecutionResult> resolveField(ExecutionContext execu

ExecutionStepInfo fieldTypeInfo = ExecutionStepInfo.newExecutionStepInfo().type(fieldDef.getType()).parentInfo(parameters.getExecutionStepInfo()).build();
ExecutionStrategyParameters newParameters = ExecutionStrategyParameters.newParameters()
.arguments(parameters.getArguments())
.fields(parameters.getFields())
.nonNullFieldValidator(parameters.getNonNullFieldValidator())
.executionStepInfo(fieldTypeInfo)
Expand Down Expand Up @@ -88,7 +87,6 @@ protected FieldValueInfo completeValue(ExecutionContext executionContext, Execut
*/
private ExecutionStrategyParameters withSource(ExecutionStrategyParameters parameters, Object source) {
return ExecutionStrategyParameters.newParameters()
.arguments(parameters.getArguments())
.fields(parameters.getFields())
.nonNullFieldValidator(parameters.getNonNullFieldValidator())
.executionStepInfo(parameters.getExecutionStepInfo())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ public void build_directive_UsingDirectivesContainer_schemaIsCreatedWithDirectiv

@GraphQLName("additional")
public static class AdditionalTypeTest {
@GraphQLField
public int getI() {
return 4;
}
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/graphql/annotations/GraphQLExtensionsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import graphql.annotations.processor.GraphQLAnnotations;
import graphql.annotations.processor.exceptions.GraphQLAnnotationsException;
import graphql.annotations.processor.retrievers.GraphQLObjectHandler;
import graphql.com.google.common.collect.ImmutableList;
import graphql.schema.*;
import org.testng.annotations.Test;

Expand Down Expand Up @@ -103,7 +104,7 @@ public void fields() {
List<GraphQLFieldDefinition> fields = object.getFieldDefinitions();
assertEquals(fields.size(), 5);

fields.sort(Comparator.comparing(GraphQLFieldDefinition::getName));
fields = ImmutableList.sortedCopyOf(Comparator.comparing(GraphQLFieldDefinition::getName), fields);

assertEquals(fields.get(0).getName(), "field");
assertEquals(fields.get(1).getName(), "field2");
Expand Down
5 changes: 3 additions & 2 deletions src/test/java/graphql/annotations/GraphQLObjectTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import graphql.annotations.processor.typeBuilders.InputObjectBuilder;
import graphql.annotations.processor.typeFunctions.TypeFunction;
import graphql.annotations.processor.util.CodeRegistryUtil;
import graphql.com.google.common.collect.ImmutableList;
import graphql.schema.*;
import graphql.schema.GraphQLType;
import graphql.schema.idl.SchemaParser;
Expand Down Expand Up @@ -275,7 +276,7 @@ public void fields() {
List<GraphQLFieldDefinition> fields = object.getFieldDefinitions();
assertEquals(fields.size(), 8);

fields.sort((o1, o2) -> o1.getName().compareTo(o2.getName()));
fields = ImmutableList.sortedCopyOf((o1, o2) -> o1.getName().compareTo(o2.getName()), fields);

assertEquals(fields.get(2).getName(), "field0");
assertEquals(fields.get(2).getDescription(), "field");
Expand Down Expand Up @@ -407,7 +408,7 @@ public void accessors() {
GraphQLObjectType object = this.graphQLAnnotations.object(TestAccessors.class);
List<GraphQLFieldDefinition> fields = object.getFieldDefinitions();
assertEquals(fields.size(), 2);
fields.sort(Comparator.comparing(GraphQLFieldDefinition::getName));
fields = ImmutableList.sortedCopyOf(Comparator.comparing(GraphQLFieldDefinition::getName), fields);

assertEquals(fields.get(0).getName(), "getValue");
assertEquals(fields.get(1).getName(), "setAnotherValue");
Expand Down