Class: Skylight::Core::Normalizers::GraphQL::Base Private
- Inherits:
-
Normalizer
- Object
- Normalizer
- Skylight::Core::Normalizers::GraphQL::Base
- 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"
Direct Known Subclasses
AnalyzeQuery, ExecuteMultiplex, ExecuteQuery, 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]".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
Class Method Summary collapse
- .inherited(klass) ⇒ Object private
- .key ⇒ Object private
- .register_graphql ⇒ Object private
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.
26 27 28 29 30 31 32 33 |
# File 'lib/skylight/core/normalizers/graphql/base.rb', line 26 def self.inherited(klass) klass.const_set( :KEY, ActiveSupport::Inflector.underscore( ActiveSupport::Inflector.demodulize(klass.name) ).freeze ) end |
.key ⇒ 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/core/normalizers/graphql/base.rb', line 35 def self.key self::KEY end |
.register_graphql ⇒ 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.
17 18 19 |
# File 'lib/skylight/core/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.
39 40 41 |
# File 'lib/skylight/core/normalizers/graphql/base.rb', line 39 def normalize(_trace, _name, _payload) [CAT, "graphql.#{key}", nil] end |