platform/graphql_schema/lib/src/validation_result.dart

15 lines
312 B
Dart
Raw Normal View History

2018-08-02 13:31:54 +00:00
part of graphql_schema.src.schema;
class ValidationResult<T> {
final bool successful;
final T value;
final List<String> errors;
ValidationResult._ok(this.value)
: errors = [],
successful = true;
ValidationResult._failure(this.errors)
: value = null,
successful = false;
}