Last active
February 15, 2019 19:17
-
-
Save luismec90/cdbb1490811971228bb3010d17f7c5b2 to your computer and use it in GitHub Desktop.
graphQL CRUD operations on client
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
mutation createColor { | |
createColor(name: "Blue") { | |
id | |
name | |
created_at | |
updated_at | |
} | |
} | |
mutation updateColor { | |
updateColor(id: 7, name: "Sky Blue") { | |
id | |
name | |
created_at | |
updated_at | |
} | |
} | |
mutation deleteColor { | |
deleteColor(id: 7) { | |
id | |
name | |
created_at | |
updated_at | |
} | |
} | |
query colors { | |
colors(count: 20) { | |
data { | |
id | |
name | |
} | |
} | |
} | |
query color { | |
color(id: 7) { | |
name | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment