Format everything
This commit is contained in:
parent
b259c2c5b8
commit
eb1db3c554
8 changed files with 10 additions and 7 deletions
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ main() {
|
|||
var parser = parse(x.toString())..parseType();
|
||||
return parser.errors.isNotEmpty;
|
||||
}, 'fails to parse type');
|
||||
|
||||
|
||||
expect('[foo', throwsSyntaxError);
|
||||
expect('[', throwsSyntaxError);
|
||||
});
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
part of graphql_schema.src.schema;
|
||||
|
||||
/// Represents the result of asserting an input [value] against a [GraphQLType].
|
||||
|
||||
class ValidationResult<Value> {
|
||||
|
|
|
@ -64,4 +64,4 @@ void main() {
|
|||
expect(a.possibleTypes, contains(c));
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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', () {
|
||||
|
|
Loading…
Reference in a new issue