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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/ide_type.rb')
-rw-r--r--app/graphql/types/ide_type.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/graphql/types/ide_type.rb b/app/graphql/types/ide_type.rb
new file mode 100644
index 00000000000..34447577f23
--- /dev/null
+++ b/app/graphql/types/ide_type.rb
@@ -0,0 +1,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