Skip to content

Commit 978dcce

Browse files
committed
Fix test
1 parent 698f433 commit 978dcce

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/test/groovy/example/http/ExecutionResultJSONTesting.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ private void testGson(HttpServletResponse response, Object er) throws IOExceptio
7070
private ExecutionResult createER() {
7171
List<GraphQLError> errors = new ArrayList<>();
7272

73-
errors.add(new ValidationError(ValidationErrorType.UnknownType, mkLocations(), "Test ValidationError")); // Retain as there is no alternative constructor for ValidationError
73+
errors.add(ValidationError.newValidationError()
74+
.validationErrorType(ValidationErrorType.UnknownType)
75+
.sourceLocations(mkLocations())
76+
.description("Test ValidationError")
77+
.build());
7478
errors.add(new MissingRootTypeException("Mutations are not supported.", null));
7579
errors.add(new InvalidSyntaxError(mkLocations(), "Not good syntax m'kay"));
7680
errors.add(new NonNullableFieldWasNullError(new NonNullableFieldWasNullException(mkExecutionInfo(), mkPath())));

0 commit comments

Comments
 (0)