Skip to content

Commit b21f16a

Browse files
committed
Merge remote-tracking branch 'upstream/master' into 268-nonnull-error-handling
# Conflicts: # src/main/java/graphql/execution/ExecutionStrategy.java # src/main/java/graphql/execution/ExecutorServiceExecutionStrategy.java # src/main/java/graphql/execution/SimpleExecutionStrategy.java # src/main/java/graphql/execution/batched/BatchedExecutionStrategy.java
2 parents 18c050e + 6581b27 commit b21f16a

94 files changed

Lines changed: 627 additions & 619 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
.idea
33
.gradle
44
build
5-
_site
5+
_site
6+
generated-src/

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This is a GraphQL Java implementation based on the [specification](https://githu
1010
and the JavaScript [reference implementation](https://github.com/graphql/graphql-js).
1111

1212

13-
**Status**: Version `2.3.0` is released.
13+
**Status**: Version `2.4.0` is released.
1414

1515
The versioning follows [Semantic Versioning](http://semver.org) since `2.0.0`.
1616

@@ -121,7 +121,7 @@ Dependency:
121121

122122
```groovy
123123
dependencies {
124-
compile 'com.graphql-java:graphql-java:2.3.0'
124+
compile 'com.graphql-java:graphql-java:2.4.0'
125125
}
126126
127127
```
@@ -134,7 +134,7 @@ Dependency:
134134
<dependency>
135135
<groupId>com.graphql-java</groupId>
136136
<artifactId>graphql-java</artifactId>
137-
<version>2.3.0</version>
137+
<version>2.4.0</version>
138138
</dependency>
139139

140140
```

‎build.gradle‎

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ apply plugin: 'maven-publish'
1010
apply plugin: 'antlr'
1111
apply plugin: 'jacoco'
1212

13-
sourceCompatibility = 1.6
14-
targetCompatibility = 1.6
13+
sourceCompatibility = 1.8
14+
targetCompatibility = 1.8
1515
def releaseVersion = System.properties.RELEASE_VERSION
1616
version = releaseVersion ? releaseVersion : new SimpleDateFormat('yyyy-MM-dd\'T\'HH-mm-ss').format(new Date())
1717
group = 'com.graphql-java'
@@ -33,7 +33,7 @@ dependencies {
3333
antlr "org.antlr:antlr4:4.5.1"
3434
testCompile group: 'junit', name: 'junit', version: '4.11'
3535
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
36-
testCompile 'org.codehaus.groovy:groovy-all:2.4.4'
36+
testCompile 'org.codehaus.groovy:groovy-all:2.4.10'
3737
testCompile 'cglib:cglib-nodep:3.1'
3838
testCompile 'org.objenesis:objenesis:2.1'
3939
}
@@ -67,13 +67,6 @@ allprojects {
6767
exclude('**/antlr/**')
6868
}
6969

70-
tasks.withType(JavaCompile) {
71-
doFirst {
72-
if (sourceCompatibility == '1.6' && System.env.JDK6_HOME != null) {
73-
options.bootClasspath = "$System.env.JDK6_HOME/jre/lib/rt.jar"
74-
}
75-
}
76-
}
7770

7871
}
7972

@@ -152,6 +145,6 @@ tasks.withType(PublishToMavenRepository) {
152145

153146

154147
task wrapper(type: Wrapper) {
155-
gradleVersion = '3.2'
148+
gradleVersion = '3.4'
156149
distributionUrl = "http://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"
157150
}

‎gradle/wrapper/gradle-wrapper.jar‎

1.37 KB
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Tue Nov 15 12:32:05 CET 2016
1+
#Fri Apr 07 17:23:20 CEST 2017
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=http\://services.gradle.org/distributions/gradle-3.2-all.zip
6+
distributionUrl=http\://services.gradle.org/distributions/gradle-3.4-all.zip

‎gradlew‎

Lines changed: 11 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/main/java/graphql/ExceptionWhileDataFetching.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public Throwable getException() {
2020

2121
@Override
2222
public String getMessage() {
23-
return "Exception while fetching data: " + exception.toString();
23+
return "Exception while fetching data: " + exception.getMessage();
2424
}
2525

2626
@Override

‎src/main/java/graphql/ExecutionResultImpl.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
public class ExecutionResultImpl implements ExecutionResult {
1010

11-
private final List<GraphQLError> errors = new ArrayList<GraphQLError>();
11+
private final List<GraphQLError> errors = new ArrayList<>();
1212
private Object data;
1313
private Map<Object,Object> extensions = null;
1414

@@ -28,7 +28,7 @@ public ExecutionResultImpl(Object data, List<? extends GraphQLError> errors, Map
2828
}
2929

3030
if (extensions != null && !extensions.isEmpty()) {
31-
this.extensions = new HashMap<Object,Object>(extensions);
31+
this.extensions = new HashMap<>(extensions);
3232
}
3333
}
3434

@@ -53,11 +53,11 @@ public void setData(Object result) {
5353

5454
@Override
5555
public List<GraphQLError> getErrors() {
56-
return new ArrayList<GraphQLError>(errors);
56+
return new ArrayList<>(errors);
5757
}
5858

5959
@Override
6060
public Map<Object, Object> getExtensions() {
61-
return extensions == null ? null : new HashMap<Object,Object>(extensions);
61+
return extensions == null ? null : new HashMap<>(extensions);
6262
}
6363
}

‎src/main/java/graphql/InvalidSyntaxError.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
public class InvalidSyntaxError implements GraphQLError {
1010

11-
private final List<SourceLocation> sourceLocations = new ArrayList<SourceLocation>();
11+
private final List<SourceLocation> sourceLocations = new ArrayList<>();
1212

1313
public InvalidSyntaxError(SourceLocation sourceLocation) {
1414
if (sourceLocation != null)

‎src/main/java/graphql/execution/Execution.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ private ExecutionResult executeOperation(
7878
return new ExecutionResultImpl(Collections.singletonList(new MutationNotSupportedError()));
7979
}
8080

81-
Map<String, List<Field>> fields = new LinkedHashMap<String, List<Field>>();
82-
fieldCollector.collectFields(executionContext, operationRootType, operationDefinition.getSelectionSet(), new ArrayList<String>(), fields);
81+
Map<String, List<Field>> fields = new LinkedHashMap<>();
82+
fieldCollector.collectFields(executionContext, operationRootType, operationDefinition.getSelectionSet(), new ArrayList<>(), fields);
8383

8484

8585
ExecutionParameters parameters = newParameters()

0 commit comments

Comments
 (0)