Skip to content

Commit cf62a7a

Browse files
committed
Renamed to ErrorClassification
1 parent 7652086 commit cf62a7a

5 files changed

Lines changed: 11 additions & 12 deletions

File tree

src/main/java/graphql/ErrorTypeClassification.java renamed to src/main/java/graphql/ErrorClassification.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
* graphql-java ships with a standard set of error classifications via {@link graphql.ErrorType}
99
*/
1010
@PublicApi
11-
public interface ErrorTypeClassification {
11+
public interface ErrorClassification {
1212
}

‎src/main/java/graphql/ErrorType.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* All the errors in graphql belong to one of these categories
66
*/
77
@PublicApi
8-
public enum ErrorType implements ErrorTypeClassification {
8+
public enum ErrorType implements ErrorClassification {
99
InvalidSyntax,
1010
ValidationError,
1111
DataFetchingException,

‎src/main/java/graphql/GraphQLError.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public interface GraphQLError extends Serializable {
3434
/**
3535
* @return an object classifying this error
3636
*/
37-
ErrorTypeClassification getErrorType();
37+
ErrorClassification getErrorType();
3838

3939
/**
4040
* The graphql spec says that the (optional) path field of any error should be a list

‎src/main/java/graphql/GraphqlErrorBuilder.java‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class GraphqlErrorBuilder {
2121
private String message;
2222
private List<Object> path;
2323
private List<SourceLocation> locations = new ArrayList<>();
24-
private ErrorTypeClassification errorType = ErrorType.DataFetchingException;
24+
private ErrorClassification errorType = ErrorType.DataFetchingException;
2525
private Map<String, Object> extensions = null;
2626

2727

@@ -74,7 +74,7 @@ public GraphqlErrorBuilder path(List<Object> path) {
7474
return this;
7575
}
7676

77-
public GraphqlErrorBuilder errorType(ErrorTypeClassification errorType) {
77+
public GraphqlErrorBuilder errorType(ErrorClassification errorType) {
7878
this.errorType = assertNotNull(errorType);
7979
return this;
8080
}
@@ -95,11 +95,11 @@ public GraphQLError build() {
9595
private static class GraphqlErrorImpl implements GraphQLError {
9696
private final String message;
9797
private final List<SourceLocation> locations;
98-
private final ErrorTypeClassification errorType;
98+
private final ErrorClassification errorType;
9999
private final List<Object> path;
100100
private final Map<String, Object> extensions;
101101

102-
public GraphqlErrorImpl(String message, List<SourceLocation> locations, ErrorTypeClassification errorType, List<Object> path, Map<String, Object> extensions) {
102+
public GraphqlErrorImpl(String message, List<SourceLocation> locations, ErrorClassification errorType, List<Object> path, Map<String, Object> extensions) {
103103
this.message = message;
104104
this.locations = locations;
105105
this.errorType = errorType;
@@ -118,7 +118,7 @@ public List<SourceLocation> getLocations() {
118118
}
119119

120120
@Override
121-
public ErrorTypeClassification getErrorType() {
121+
public ErrorClassification getErrorType() {
122122
return errorType;
123123
}
124124

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package graphql.execution;
22

3-
import graphql.ErrorType;
4-
import graphql.ErrorTypeClassification;
3+
import graphql.ErrorClassification;
54
import graphql.GraphQLError;
65
import graphql.Internal;
76
import graphql.language.SourceLocation;
@@ -26,7 +25,7 @@ public class AbsoluteGraphQLError implements GraphQLError {
2625
private final List<SourceLocation> locations;
2726
private final List<Object> absolutePath;
2827
private final String message;
29-
private final ErrorTypeClassification errorType;
28+
private final ErrorClassification errorType;
3029
private final Map<String, Object> extensions;
3130

3231
public AbsoluteGraphQLError(ExecutionStrategyParameters executionStrategyParameters, GraphQLError relativeError) {
@@ -69,7 +68,7 @@ public List<SourceLocation> getLocations() {
6968
}
7069

7170
@Override
72-
public ErrorTypeClassification getErrorType() {
71+
public ErrorClassification getErrorType() {
7372
return errorType;
7473
}
7574

0 commit comments

Comments
 (0)