platform/packages/graphql/graphql_schema/test/common.dart
Tobe O 4e69153e3e Add 'packages/graphql/' from commit '33e2f86ba73d559197b6270df036256104726aca'
git-subtree-dir: packages/graphql
git-subtree-mainline: ac29392d7f
git-subtree-split: 33e2f86ba7
2020-02-15 18:22:07 -05:00

15 lines
488 B
Dart

import 'package:graphql_schema/graphql_schema.dart';
final GraphQLObjectType pokemonType = objectType('Pokemon', fields: [
field('species', graphQLString),
field('catch_date', graphQLDate)
]);
final GraphQLObjectType trainerType =
objectType('Trainer', fields: [field('name', graphQLString)]);
final GraphQLObjectType pokemonRegionType = objectType('PokemonRegion',
fields: [
field('trainer', trainerType),
field('pokemon_species', listOf(pokemonType))
]);