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

Inherits:
Normalizer
  • Object
show all
Defined in:
lib/skylight/core/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"

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]".freeze
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".freeze

Instance Attribute Summary

Attributes inherited from Normalizer

#config

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Normalizer

#initialize, #normalize_after, register

Constructor Details

This class inherits a constructor from Skylight::Core::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.


24
25
26
# File 'lib/skylight/core/normalizers/graphql/base.rb', line 24

def self.inherited(klass)
  klass.const_set(:KEY, klass.name.demodulize.underscore.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.


28
29
30
# File 'lib/skylight/core/normalizers/graphql/base.rb', line 28

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.


15
16
17
# File 'lib/skylight/core/normalizers/graphql/base.rb', line 15

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.


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

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