Package graphql
Class ParseAndValidateResult
java.lang.Object
graphql.ParseAndValidateResult
A result object used in
ParseAndValidate
helper that indicates the outcomes of a parse
and validate operation.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Document
private final InvalidSyntaxException
private final List
<ValidationError> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
-
Method Summary
Modifier and TypeMethodDescriptionA list of all the errors (parse and validate) that have occurredboolean
transform
(Consumer<ParseAndValidateResult.Builder> builderConsumer)
-
Field Details
-
document
-
variables
-
syntaxException
-
validationErrors
-
-
Constructor Details
-
ParseAndValidateResult
-
-
Method Details
-
isFailure
public boolean isFailure()- Returns:
- true if there was a parse exception or the validation failed
-
getDocument
- Returns:
- the parsed document or null if it's syntactically invalid.
-
getVariables
- Returns:
- the document variables or null if it's syntactically invalid.
-
getDocumentAndVariables
- Returns:
- the parsed document and variables or null if it's syntactically invalid.
-
getSyntaxException
- Returns:
- the syntax exception or null if it's syntactically valid.
-
getValidationErrors
- Returns:
- a list of validation errors, which might be empty if it's syntactically invalid.
-
getErrors
A list of all the errors (parse and validate) that have occurred- Returns:
- the errors that have occurred or empty list if there are none
-
transform
-
newResult
-