delete.rb 598 B

123456789101112131415161718
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. module Gql::Mutations
  3. class User::Current::TaskbarItem::Delete < BaseMutation
  4. description 'Delete a taskbar item of the currently logged-in user'
  5. argument :id, GraphQL::Types::ID, required: true, loads: Gql::Types::User::TaskbarItemType, as: :taskbar_item, description: 'The taskbar item ID'
  6. field :success, Boolean, description: 'This indicates if deleting the user (session) device was successful.'
  7. def resolve(taskbar_item:)
  8. taskbar_item.destroy!
  9. { success: true }
  10. end
  11. end
  12. end