Welcome to mirror list, hosted at ThFree Co, Russian Federation.

user_achievement_type.rb « achievements « types « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7cdcb66576c7d4ac84a65c9255ade1e24d1e8c73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# frozen_string_literal: true

module Types
  module Achievements
    class UserAchievementType < BaseObject
      graphql_name 'UserAchievement'

      connection_type_class Types::CountableConnectionType

      authorize :read_user_achievement

      field :id,
        ::Types::GlobalIDType[::Achievements::UserAchievement],
        null: false,
        description: 'ID of the user achievement.'

      field :achievement,
        ::Types::Achievements::AchievementType,
        null: false,
        description: 'Achievement awarded.'

      field :user,
        ::Types::UserType,
        null: false,
        description: 'Achievement recipient.'

      field :awarded_by_user,
        ::Types::UserType,
        null: false,
        description: 'Awarded by.'

      field :revoked_by_user,
        ::Types::UserType,
        null: true,
        description: 'Revoked by.'

      field :created_at,
        Types::TimeType,
        null: false,
        description: 'Timestamp the achievement was created.'

      field :updated_at,
        Types::TimeType,
        null: false,
        description: 'Timestamp the achievement was last updated.'

      field :revoked_at,
        Types::TimeType,
        null: true,
        description: 'Timestamp the achievement was revoked.'
    end
  end
end