Skip to content

Instantly share code, notes, and snippets.

@luismec90
Last active February 15, 2019 19:17
Show Gist options
  • Save luismec90/cdbb1490811971228bb3010d17f7c5b2 to your computer and use it in GitHub Desktop.
Save luismec90/cdbb1490811971228bb3010d17f7c5b2 to your computer and use it in GitHub Desktop.
graphQL CRUD operations on client
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