18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/elastic_graph/query_registry/graphql_extension.rb', line 18
def graphql_query_executor
@graphql_query_executor ||= if (registry_config = QueryRegistry::Config.from_parsed_yaml(config.extension_settings))
RegistryAwareQueryExecutor.new(
schema: schema,
monotonic_clock: monotonic_clock,
logger: logger,
slow_query_threshold_ms: config.slow_query_latency_warning_threshold_in_ms,
registry_directory: registry_config.path_to_registry,
allow_unregistered_clients: registry_config.allow_unregistered_clients,
allow_any_query_for_clients: registry_config.allow_any_query_for_clients
)
else
super
end
end
|