       output do
         field :id, :id
       end
-      resolve fn _, _ ->
-        {:ok, %{id: 1}}
+      resolve fn _parent, attributes, _info ->
+        IO.inspect attributes
+        task = Repo.get!(Task, attributes.id)
+        Repo.delete(task)
+        {:ok, %{id: task.id}}
       end
     end
 


  use Absinthe.Schema
  use Absinthe.Relay.Schema

  @tasks [
    %{id: 1, description: "Todo 1", estimated_size: 1,

      output do
        field :task, :task
      end
      resolve fn _parent, attributes, _info ->
        IO.inspect attributes
        changeset = Task.changeset(%Task{type: "root"}, attributes)
        case Repo.insert(changeset) do
          {:ok, task} -> {:ok, %{task: task}}
          {:error, changeset} -> {:error, changeset.errors}
        end
      end
    end

    payload field :update_task do
      input do
        field :id, non_null(:id)
        field :estimated_size, :integer
        field :description, :string
        field :root_flg, :boolean
