Created
January 3, 2018 21:17
-
-
Save maticzav/922c3285dee4752065e258eabf5d32b0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# To Authenticate | |
mutation Authenticate($githubCode: String!) { | |
authenticate(githubCode: $githubCode) { | |
token | |
user { | |
name | |
} | |
} | |
} | |
# To create a Note | |
mutation NewNote($text: String!) { | |
createNote(text: $text) { | |
id | |
text | |
} | |
} | |
# To edit a Note | |
mutation ChangeNote($id: ID!, $newText: String!) { | |
updateNote(id: $id, text: $newText) { | |
id | |
text | |
} | |
} | |
# To delete a Note | |
mutation DeleteNote($id: ID!) { | |
deleteNote(id: $id) { | |
id | |
} | |
} | |
# To get your profile and your notes | |
mutation Me { | |
me { | |
name | |
bio | |
notes { | |
id | |
text | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Should be Query instead of mutation
mutation Me { me { name bio notes { id text } } }