current_user.rb 301 B

123456789101112131415
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. module Gql::Queries
  3. class CurrentUser < BaseQuery
  4. description 'Information about the authenticated user'
  5. type Gql::Types::UserType, null: false
  6. def resolve(...)
  7. context.current_user
  8. end
  9. end
  10. end