Validation result docs

This commit is contained in:
Tobe O 2018-08-04 22:38:11 -04:00
parent a297dcad46
commit 34d086fa24

View file

@ -1,8 +1,14 @@
part of graphql_schema.src.schema; part of graphql_schema.src.schema;
class ValidationResult<T> { /// Represents the result of asserting an input [value] against a [GraphQLType].
class ValidationResult<Value> {
/// `true` if there were no errors during validation.
final bool successful; final bool successful;
final T value;
/// The input value passed to whatever caller invoked validation.
final Value value;
/// A list of errors that caused validation to fail.
final List<String> errors; final List<String> errors;
ValidationResult._(this.successful, this.value, this.errors); ValidationResult._(this.successful, this.value, this.errors);