Class: Skylight::Normalizers::GraphQL::Base Private

Inherits:
Normalizer show all
Defined in:
lib/skylight/normalizers/graphql/base.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Some AS::N events in GraphQL are not super useful. We are purposefully ignoring the following keys (and you probably shouldn’t add them):

- "graphql.analyze_multiplex"
- "graphql.execute_field" (very frequently called)
- "graphql.execute_field_lazy"

Direct Known Subclasses

AnalyzeQuery, Execute, Lex, Parse, Validate

Constant Summary collapse

ANONYMOUS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

"[anonymous]"
CAT =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

"app.graphql"

Instance Attribute Summary

Attributes inherited from Normalizer

#config

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Normalizer

#initialize, #normalize_after, #normalize_with_meta, register

Methods included from Util::Logging

#config_for_logging, #debug, #error, #fmt, #info, #log, #log_context, #raise_on_error?, #t, #trace, #trace?, #warn

Constructor Details

This class inherits a constructor from Skylight::Normalizers::Normalizer

Class Method Details

.inherited(klass) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



26
27
28
29
# File 'lib/skylight/normalizers/graphql/base.rb', line 26

def self.inherited(klass)
  super
  klass.const_set(:KEY, ActiveSupport::Inflector.underscore(ActiveSupport::Inflector.demodulize(klass.name)).freeze)
end

.keyObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



31
32
33
# File 'lib/skylight/normalizers/graphql/base.rb', line 31

def self.key
  self::KEY
end

.register_graphqlObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



17
18
19
# File 'lib/skylight/normalizers/graphql/base.rb', line 17

def self.register_graphql
  register("#{key}.graphql")
end

Instance Method Details

#normalize(_trace, _name, _payload) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



35
36
37
# File 'lib/skylight/normalizers/graphql/base.rb', line 35

def normalize(_trace, _name, _payload)
  [CAT, "graphql.#{key}", nil]
end