summaryrefslogtreecommitdiff
path: root/app/graphql/types/query_type.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/query_type.rb')
-rw-r--r--app/graphql/types/query_type.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/graphql/types/query_type.rb b/app/graphql/types/query_type.rb
index 954bcc0a5a3..472fe5d6ec2 100644
--- a/app/graphql/types/query_type.rb
+++ b/app/graphql/types/query_type.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module Types
- class QueryType < BaseObject
+ class QueryType < ::Types::BaseObject
graphql_name 'Query'
field :project, Types::ProjectType,
@@ -10,6 +10,14 @@ module Types
description: "Find a project",
authorize: :read_project
+ field :metadata, Types::MetadataType,
+ null: true,
+ resolver: Resolvers::MetadataResolver,
+ description: 'Metadata about GitLab' do |*args|
+
+ authorize :read_instance_metadata
+ end
+
field :echo, GraphQL::STRING_TYPE, null: false, function: Functions::Echo.new
end
end