Check out Github's GraphQL explorer for a great example of this: https://developer.github.com/early-access/graphql/explorer/