module Mutations
  class CreateItem < BaseMutation
    # arguments passed to the `resolve` method
    argument :name, String, required: true

    # return type from the mutation
    type Types::ItemType

    def resolve(name: nil)
      Item.create!(
        name: name,
      )
    end
  end
end

