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