Guest User

Untitled

a guest
May 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. query Items($limit: Int!) { // The name of the class that will contain a query from the file schema.json
  2. customerItem(limit: $limit) { // The name of the query from the file schema.json
  3. ...CustomerItemInfo // GraphQL fragment that is described below
  4. }
  5. }
  6. query UserInfo {
  7. currentCustomer {
  8. ...User
  9. }
  10. }
  11. mutation AddItem($source: String!) {
  12. createItem(source: $source) {
  13. ...CustomerItemInfo
  14. }
  15. }
  16. fragment CustomerItemInfo on CustomerItem { // CustomerItem - type from the file schema.json. That means your fragment contains fields from this type object
  17. id
  18. brand
  19. price
  20. title
  21. }
  22. fragment User on Customer {
  23. email
  24. full_name
  25. id
  26. }
Add Comment
Please, Sign In to add comment