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

ide_type.rb « types « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 34447577f23f00b886a5f28531116dcd1f993148 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module Types
  class IdeType < BaseObject
    graphql_name 'Ide'
    description 'IDE settings and feature flags.'

    authorize :read_user

    field :code_suggestions_enabled, GraphQL::Types::Boolean, null: false,
      description: 'Indicates whether AI assisted code suggestions are enabled.'

    def code_suggestions_enabled
      object.can?(:access_code_suggestions)
    end
  end
end