Last active
October 2, 2015 20:57
-
-
Save jdivock/47a576b0cf4c6fe464a1 to your computer and use it in GitHub Desktop.
graphql snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fragment JayFragment on Account { | |
email, | |
id | |
} | |
query UseFragment { | |
jay: account(id: 1) { | |
...JayFragment | |
} | |
} | |
{ | |
__schema { | |
queryType { | |
name, | |
fields { | |
name, | |
description | |
} | |
} | |
} | |
} | |
{ | |
account: account(id:1) { | |
id, | |
name, | |
workouts { | |
id, | |
name, | |
date | |
} | |
}, | |
workout: workout(id:1) { | |
id, | |
name | |
}, | |
lift: lift(id:1) { | |
id, | |
name | |
}, | |
accounts: accounts { | |
id, | |
} | |
} | |
mutation M { | |
addLift(workoutid: 1, name: "test 5 lift", reps: 2, sets: 5, weight: 100) { | |
id, | |
name, | |
reps, | |
workoutid, | |
workout { | |
name, | |
id | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment