Validation result docs
This commit is contained in:
parent
a297dcad46
commit
34d086fa24
1 changed files with 8 additions and 2 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue