Skip to content

Instantly share code, notes, and snippets.

@rajikaimal
Last active December 19, 2015 16:43
Show Gist options
  • Select an option

  • Save rajikaimal/54cb690787461f921235 to your computer and use it in GitHub Desktop.

Select an option

Save rajikaimal/54cb690787461f921235 to your computer and use it in GitHub Desktop.
Fragments in GraphQL
{
users {
...RepFields
followers {
...RepFields
},
birthday {
date,
month,
year
}
}
}
fragment RepFields on User {
_id,
name,
age
}
{
users {
_id,
name,
age,
followers {
_id,
name,
age
},
birthday {
date,
month,
year
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment