# This file was generated based on ".graphqlconfig". Do not edit manually.

schema {
    query: Query
    mutation: Mutation
}

"Response interface"
interface ResponseField {
    errorMessage: String
    isSuccess: Boolean
}

"Assign an existing task to an existing user"
type AssignTodoToUser {
    result: ResponseField
}

"Close an existing task"
type CloseTodo {
    result: TodoResponseField
}

"Create a new task."
type CreateTodo {
    result: TodoResponseField
}

"Register an user"
type CreateUser {
    result: UserResponseField
}

"Deassign an existing task from an existing user"
type DeassignTodoToUser {
    result: ResponseField
}

"Delete an existing task"
type DeleteTodo {
    result: TodoResponseField
}

"Unregister an existing user"
type DeleteUser {
    result: UserResponseField
}

type Mutation {
    "Assign an existing task to an existing user"
    assignTodoToUser(todoId: String, userId: String): AssignTodoToUser
    "Close an existing task"
    closeTodo(todoId: String!): CloseTodo
    "Create a new task."
    createTodo(title: String!): CreateTodo
    "Register an user"
    createUser(username: String): CreateUser
    "Deassign an existing task from an existing user"
    deassignTodoToUser(todoId: String, userId: String): DeassignTodoToUser
    "Delete an existing task"
    deleteTodo(todoId: String!): DeleteTodo
    "Unregister an existing user"
    deleteUser(userId: String!): DeleteUser
    "Update an existing task"
    updateTodo(todo: TodoInputType): UpdateTodo
    "Update user information"
    updateUser(user: UserInputType): UpdateUser
}

type Query {
    "Retrieve an existing tasks"
    getTodo(todoId: String!): TodoResponseField
    "Retrieve a registered user"
    getUser(userId: String!): UserResponseField
    "List existing tasks"
    listTodos: TodoListResponseField
    "List registered users"
    listUsers: UserListResponseField
}

"Todos list response object"
type TodoListResponseField implements ResponseField {
    errorMessage: String
    isSuccess: Boolean
    todos: [TodoType]
}

"Todo response object"
type TodoResponseField implements ResponseField {
    errorMessage: String
    isSuccess: Boolean
    todo: TodoType
}

"Todo Object Type"
type TodoType {
    isDone: Boolean
    title: String
    todoId: String
}

"Update an existing task"
type UpdateTodo {
    result: TodoResponseField
}

"Update user information"
type UpdateUser {
    result: UserResponseField
}

"User list response object"
type UserListResponseField implements ResponseField {
    errorMessage: String
    isSuccess: Boolean
    users: [UserType]
}

"User response object"
type UserResponseField implements ResponseField {
    errorMessage: String
    isSuccess: Boolean
    user: UserType
}

"User schema type"
type UserType {
    tasks: [TodoType]
    userId: String
    username: String
}

"Todo Input Object"
input TodoInputType {
    isDone: Boolean
    title: String
    todoId: String
}

"User input object"
input UserInputType {
    userId: String
    username: String
}
