Last active
October 16, 2018 22:02
-
-
Save appwiz/1a9ce4b6123b1c1f16dfcaf1bc766747 to your computer and use it in GitHub Desktop.
GraphQL queries
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
# Click the orange "Play" button and select the createColorCommand | |
# mutation to create an object in DynamoDB. | |
# If you see an error that starts with "Unable to assume role", | |
# wait a moment and try again. | |
mutation createColorCommand($createcolorcommandinput: CreateColorCommandInput!) { | |
createColorCommand(input: $createcolorcommandinput) { | |
id | |
timestamp | |
color | |
} | |
} | |
# After running createColorCommand, try running the listColorCommands query. | |
query listColorCommands { | |
listColorCommands { | |
items { | |
id | |
timestamp | |
color | |
} | |
} | |
} | |
subscription onCreate { | |
onCreateColorCommand { | |
id | |
timestamp | |
color | |
} | |
} | |
// query variables | |
{ | |
"createcolorcommandinput": { | |
"id": "RU6T90JB8HBUJL1wzNML3ZF5HijG6YbY", | |
"timestamp": "Hello, world!", | |
"color": "Hello, world!" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment