private static ExecutionResultData data(Object data, NonNullableFieldWasNullException exception) { return new ExecutionResultData(data, Arrays.asList(new NonNullableFieldWasNullError(exception))); }
@Override public String getMessage() { return delegate.getMessage(); }
@Override public ErrorType getErrorType() { return delegate.getErrorType(); }
@Override public List<Object> getPath() { return delegate.getPath(); }
@Override public Map<String, Object> toSpecification() { return delegate.toSpecification(); }
@Override @JsonInclude(JsonInclude.Include.NON_NULL) public Map<String, Object> getExtensions() { return delegate.getExtensions(); }
@Override @JsonInclude(JsonInclude.Include.NON_NULL) public List<SourceLocation> getLocations() { return delegate.getLocations(); }
executionContext.addError(new NonNullableFieldWasNullError(nonNullException), path); throw nonNullException;
private ExecutionResult createER() { List<GraphQLError> errors = new ArrayList<>(); errors.add(new ValidationError(ValidationErrorType.UnknownType, mkLocations(), "Test ValidationError")); errors.add(new MissingRootTypeException("Mutations are not supported.", null)); errors.add(new InvalidSyntaxError(mkLocations(), "Not good syntax m'kay")); errors.add(new NonNullableFieldWasNullError(new NonNullableFieldWasNullException(mkExecutionInfo(), mkPath()))); errors.add(new SerializationError(mkPath(), new CoercingSerializeException("Bad coercing"))); errors.add(new ExceptionWhileDataFetching(mkPath(), new RuntimeException("Bang"), mkLocation(666, 999))); return new ExecutionResultImpl(null, errors); }
private static ExecutionResultData data(Object data, NonNullableFieldWasNullException exception) { return new ExecutionResultData(data, Arrays.asList(new NonNullableFieldWasNullError(exception))); }
executionContext.addError(new NonNullableFieldWasNullError(nonNullException), path); throw nonNullException;