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

custom_emoji_type.rb « types « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 08ac3172f2caca398fcdf39772d89299bd580935 (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
# frozen_string_literal: true

module Types
  class CustomEmojiType < BaseObject
    graphql_name 'CustomEmoji'
    description 'A custom emoji uploaded by user'

    authorize :read_custom_emoji

    connection_type_class Types::CountableConnectionType

    expose_permissions Types::PermissionTypes::CustomEmoji

    field :id, ::Types::GlobalIDType[::CustomEmoji],
          null: false,
          description: 'ID of the emoji.'

    field :name, GraphQL::Types::String,
          null: false,
          description: 'Name of the emoji.'

    field :url, GraphQL::Types::String,
          null: false,
          method: :file,
          description: 'Link to file of the emoji.'

    field :external, GraphQL::Types::Boolean,
          null: false,
          description: 'Whether the emoji is an external link.'

    field :created_at, Types::TimeType,
          null: false,
          description: 'Timestamp of when the custom emoji was created.'
  end
end