Skip to content

Instantly share code, notes, and snippets.

@JasCodes
Last active September 19, 2020 06:09
Show Gist options
  • Save JasCodes/0db5c2d1a5bafa5479144f06723d57e2 to your computer and use it in GitHub Desktop.
Save JasCodes/0db5c2d1a5bafa5479144f06723d57e2 to your computer and use it in GitHub Desktop.
Dart Graphqless
// Pokemon Class is generated code from introspection
final NestedFragment = Pokemon(retFields:[id,name]);
final PokemonCard = Pokemon(returnFields:[maxHP,image],fragments:[NestedFragment]);
final q1Result = Pokemon(fragments:[PokemonCard]).query();
final q2Result = Pokemon(fragments:[PokemonCard],returnFields:[weight(returnFields:minimum,maximum),height(minimum,maximum)]).query();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment