Class: Yabeda::GraphQL::Instrumentation
- Inherits:
-
Object
- Object
- Yabeda::GraphQL::Instrumentation
- Defined in:
- lib/yabeda/graphql/instrumentation.rb
Instance Method Summary collapse
Instance Method Details
#after_query(query) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/yabeda/graphql/instrumentation.rb', line 8 def after_query(query) cache(query).each do |_path, | Yabeda.graphql.field_resolve_runtime.measure([:tags], [:duration]) Yabeda.graphql.fields_request_count.increment([:tags]) end end |
#before_query(query) ⇒ Object
4 5 6 |
# File 'lib/yabeda/graphql/instrumentation.rb', line 4 def before_query(query) reset_cache!(query) end |