Warning If something does not work, look at the screenshots
Query
mutation createUser($input: CreateUserInput!){
createUser(input: $input) {
email
_id
name
}
}
Input
{
"input": {
"email": "[email protected]",
"name": "Jane Doe",
"password": "password"
}
}
Note If login does not work firts time, play second time
Query
mutation login($input: LoginInput!){
login(input: $input)
}
Input
{
"input": {
"email": "[email protected]",
"password": "password"
}
}
You should authorize before to create a task
HTTP HEADERS
{
"Authorization" : "/Token that recieved from login/"
}
Query
mutation createTask($input: CreateProductInput!){
createProduct(input: $input){
name,
taskUserId,
isParent
parentId /If sub task, add parentId, else remove parentId/
state
}
}
Input
{
"input": {
"name": "A test task",
"taskUserId" : "/task users mongoId/"
"isParent": false,
"parentId": "/An id of the parent task/",
"state" : "done"
}
}
query tasks {
tasks {
_id,
name,
isParent
}
}
Query
query task($input: GetTaskInput!) {
task(input: $input) {
_id,
name,
subTasks{
_id,
name
}
}
}
Input
{
"input": {
"_id": "/parent task's mongoId/"
}
}
Query
query search($input: SearchTaskInput!) {
search(input: $input) {
_id,
name,
subTasks{
_id,
name
}
}
}
Input
{
"input": {
"search": "/name of the task/"
}
}
You should authorize before to create a comment
HTTP HEADERS
{
"Authorization" : "/Token that recieved from login/"
}
Query
mutation createComment($input: CreateCommentInput!){
createComment(input: $input){
comment,
taskId
}
}
Input
{
"input": {
"comment" : "test comment",
"taskId": "/a mongoid of the task/"
}
}