Skip to content

Commit

Permalink
add an field to delete budgets
Browse files Browse the repository at this point in the history
  • Loading branch information
zacck committed Mar 29, 2018
1 parent 93441ea commit de859e1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/spender_web/schema.ex
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,20 @@ defmodule SpenderWeb.Schema do

# add mutations handled by our schema
mutation do
@desc "Deletes an exisiting MoneyLog"
field :delete_budget, :budget do
arg :input, non_null(:budget_update)
middleware Middleware.Authorize, :any
resolve &Resolvers.Owner.delete_budget/3
end

@desc "Updates a WishList Item"
field :update_wish_list_item, :wish_list_item do
arg :input, non_null(:wish_list_item_update_input)
middleware Middleware.Authorize, :any
resolve &Resolvers.WishList.update_item/3
end

@desc "creates a wishlist item"
field :create_wish_list_item, :wish_list_item do
arg :input, non_null(:wish_list_item_input)
Expand Down

0 comments on commit de859e1

Please sign in to comment.