platform/packages/graphql/graphql_schema/test/common.dart

16 lines
488 B
Dart
Raw Permalink 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),
2018-08-05 01:49:13 +00:00
field('pokemon_species', listOf(pokemonType))
2018-08-04 19:18:53 +00:00
]);