diff --git a/schema.graphql b/schema.graphql
index 77717ba..d7bc99e 100644
--- a/schema.graphql
+++ b/schema.graphql
@@ -5,6 +5,10 @@ schema {
mutation: Mutations
}
+type CloseTodo {
+ todo: TodoType
+}
+
type CreateTodo {
todo: TodoType
}
@@ -14,15 +18,22 @@ type DeleteTodo {
}
type Mutations {
+ closeTodo(todoId: String!): CloseTodo
createTodo(title: String = ""): CreateTodo
deleteTodo(todoId: String!): DeleteTodo
updateTodo(todo: TodoInputType): UpdateTodo
}
+type TodoListResponseField {
+ errorMessage: String
+ isSuccess: Boolean
+ todos: [TodoType]
+}
+
"Defines the query and how to interact with"
type TodoQuery {
getTodo(todoId: String!): TodoResponseField
- listTodos: [TodoType]
+ listTodos: TodoListResponseField
}
type TodoResponseField {
diff --git a/src/containers/home/index.tsx b/src/containers/home/index.tsx
index 5861ad5..50a44ff 100644
--- a/src/containers/home/index.tsx
+++ b/src/containers/home/index.tsx
@@ -31,7 +31,7 @@ export const Home: FC = () => {
!loading &&
!!data && (
<>
-