Module: Gitlab::Graphql::CallsGitaly

Extended by:
ActiveSupport::Concern
Defined in:
lib/gitlab/graphql/calls_gitaly.rb,
lib/gitlab/graphql/calls_gitaly/instrumentation.rb

Overview

Wraps the field resolution to count Gitaly calls before and after. Raises an error if the field calls Gitaly but hadn't declared such.

Defined Under Namespace

Classes: Instrumentation

Class Method Summary collapse

Class Method Details

.use(schema_definition) ⇒ Object


10
11
12
# File 'lib/gitlab/graphql/calls_gitaly.rb', line 10

def self.use(schema_definition)
  schema_definition.instrument(:field, Gitlab::Graphql::CallsGitaly::Instrumentation.new, after_built_ins: true)
end