module GraphQL::PersistedQueries::CompiledQueries::MultiplexPatch
Patches GraphQL::Execution::Multiplex to support compiled queries
Public Instance Methods
add_not_found_error(query)
click to toggle source
# File lib/graphql/persisted_queries/compiled_queries/multiplex_patch.rb, line 22 def add_not_found_error(query) query.context.errors.clear query.context.errors << GraphQL::ExecutionError.new("PersistedQueryNotFound") GraphQL::Execution::Multiplex::NO_OPERATION end
begin_query(results, idx, query, multiplex)
click to toggle source
Calls superclass method
# File lib/graphql/persisted_queries/compiled_queries/multiplex_patch.rb, line 9 def begin_query(results, idx, query, multiplex) return super unless query.persisted_query_not_found? results[idx] = add_not_found_error(query) end