File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,12 @@ public interface GraphQLError extends Serializable {
2727
2828 /**
2929 * @return a description of the error intended for the developer as a guide to understand and correct the error
30+ *
31+ * Non-nullable from the spec:
32+ * Every error must contain an entry with the key "message" with a string description of the error intended for
33+ * the developer as a guide to understand and correct the error.
3034 */
31- @ Nullable String getMessage ();
35+ String getMessage ();
3236
3337 /**
3438 * @return the location(s) within the GraphQL document at which the error occurred. Each {@link SourceLocation}
Original file line number Diff line number Diff line change 2222public class ValidationError implements GraphQLError {
2323
2424 private final List <SourceLocation > locations = new ArrayList <>();
25- private final @ Nullable String description ;
25+ private final String description ;
2626 private final @ Nullable ValidationErrorClassification validationErrorType ;
2727 private final List <String > queryPath = new ArrayList <>();
2828 private final ImmutableMap <String , Object > extensions ;
@@ -46,11 +46,11 @@ private ValidationError(Builder builder) {
4646 }
4747
4848 @ Override
49- public @ Nullable String getMessage () {
49+ public String getMessage () {
5050 return description ;
5151 }
5252
53- public @ Nullable String getDescription () {
53+ public String getDescription () {
5454 return description ;
5555 }
5656
You can’t perform that action at this time.
0 commit comments