Note: This GraphQL-Subscriptions example uses the Server-Side-Events as HTTP Transport.
Install it and run:
npm install
npm run devquery loadAllTodos {
todos {
id
rev
text
isCompleted
}
}
mutation addTodo {
upsertTodo(input: {text: "hello world!"}) {
id
rev
text
isCompleted
}
}
mutation removeTodo {
deleteTodo(input: {id: "", rev: ""}) {
id
rev
text
isCompleted
}
}
subscription onTodoChanged {
onTodoChanged {
id
rev
text
isCompleted
}
}Deploy it to the cloud with DropStack
npm i -g dropstack-cli
dropstack login
dropstack deploy