Module: GraphQL::PersistedQueries::CompiledQueries::Instrumentation
- Defined in:
- lib/graphql/persisted_queries/compiled_queries/instrumentation.rb
Overview
Instrumentation to support compiled queries
Class Method Summary collapse
- .after_query ⇒ Object
-
.before_query(query) ⇒ Object
Actions to perform before the query resolution.
Class Method Details
.after_query ⇒ Object
20 |
# File 'lib/graphql/persisted_queries/compiled_queries/instrumentation.rb', line 20 def after_query(*); end |
.before_query(query) ⇒ Object
Actions to perform before the query resolution
10 11 12 13 14 15 16 17 18 |
# File 'lib/graphql/persisted_queries/compiled_queries/instrumentation.rb', line 10 def before_query(query) return unless query.context[:extensions] query.try_load_document! return if query.document || query.query_string query.persisted_query_not_found! query.context.errors << GraphQL::ExecutionError.new(NotFound::MESSAGE) end |