platform/graphql_schema/test/common.dart

16 lines
490 B
Dart
Raw Normal View History

2018-08-02 13:31:54 +00:00
import 'package:graphql_schema/graphql_schema.dart';
2018-08-04 19:18:53 +00:00
final GraphQLObjectType pokemonType = objectType('Pokemon', fields: [
field('species', graphQLString),
field('catch_date', graphQLDate)
2018-08-02 13:31:54 +00:00
]);
final GraphQLObjectType trainerType =
2018-08-04 19:18:53 +00:00
objectType('Trainer', fields: [field('name', graphQLString)]);
2018-08-02 13:31:54 +00:00
2018-08-04 19:18:53 +00:00
final GraphQLObjectType pokemonRegionType = objectType('PokemonRegion',
fields: [
field('trainer', trainerType),
field('pokemon_species', listType(pokemonType))
]);