diff options
Diffstat (limited to 'app/graphql/types/query_type.rb')
-rw-r--r-- | app/graphql/types/query_type.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/graphql/types/query_type.rb b/app/graphql/types/query_type.rb index 8b7b9f0107b..d2c67aea95c 100644 --- a/app/graphql/types/query_type.rb +++ b/app/graphql/types/query_type.rb @@ -36,6 +36,10 @@ module Types resolver: Resolvers::MetadataResolver, description: 'Metadata about GitLab.' + field :query_complexity, Types::QueryComplexityType, + null: true, + description: 'Information about the complexity of the GraphQL query.' + field :snippets, Types::SnippetType.connection_type, null: true, @@ -170,6 +174,10 @@ module Types def application_settings Gitlab::CurrentSettings.current_application_settings end + + def query_complexity + context.query + end end end |