Format everything

This commit is contained in:
Tobe O 2019-03-29 14:45:02 -04:00
parent b259c2c5b8
commit eb1db3c554
8 changed files with 10 additions and 7 deletions

View file

@ -1,3 +1,3 @@
import 'package:graphql_parser/graphql_parser.dart';
Parser parse(String text) => new Parser(scan(text));
Parser parse(String text) => new Parser(scan(text));

View file

@ -25,7 +25,7 @@ main() {
var parser = parse(x.toString())..parseDirective();
return parser.errors.isNotEmpty;
}, 'fails to parse directive');
expect('@', isSyntaxError);
expect('@foo:', isSyntaxError);
expect('@foo (', isSyntaxError);

View file

@ -47,7 +47,7 @@ main() {
var parser = parse(x.toString())..parseSelectionSet();
return parser.errors.isNotEmpty;
}, 'fails to parse selection set');
expect('{foo,bar,baz', throwsSyntaxError);
});
}

View file

@ -39,7 +39,7 @@ main() {
var parser = parse(x.toString())..parseType();
return parser.errors.isNotEmpty;
}, 'fails to parse type');
expect('[foo', throwsSyntaxError);
expect('[', throwsSyntaxError);
});

View file

@ -23,7 +23,8 @@ GraphQLObjectField<T, Serialized> field<T, Serialized>(
String name, GraphQLType<T, Serialized> type,
{Iterable<GraphQLFieldInput<T, Serialized>> inputs: const [],
GraphQLFieldResolver<T, Serialized> resolve,
String deprecationReason, String description}) {
String deprecationReason,
String description}) {
return new GraphQLObjectField<T, Serialized>(name, type,
arguments: inputs,
resolve: resolve,

View file

@ -1,4 +1,5 @@
part of graphql_schema.src.schema;
/// Represents the result of asserting an input [value] against a [GraphQLType].
class ValidationResult<Value> {

View file

@ -64,4 +64,4 @@ void main() {
expect(a.possibleTypes, contains(c));
});
});
}
}

View file

@ -96,7 +96,8 @@ main() {
var u = new GraphQLUnionType('Monster', [pokemonType, digimonType]);
expect(u.serialize({'size': 10.0}), {'size': 10.0});
expect(u.serialize({'name': 'Charmander', 'type': 'FIRE'}), {'name': 'Charmander', 'type': 'FIRE'});
expect(u.serialize({'name': 'Charmander', 'type': 'FIRE'}),
{'name': 'Charmander', 'type': 'FIRE'});
});
test('nested object', () {