pub struct QueryPlannerDebugConfig {
pub bypass_planner_for_single_subgraph: Option<bool>,
pub max_evaluated_plans: Option<u32>,
pub paths_limit: Option<u32>,
}Expand description
Query planner debug configuration
Fields§
§bypass_planner_for_single_subgraph: Option<bool>If used and the supergraph is built from a single subgraph, then user queries do not go through the normal query planning and instead a fetch to the one subgraph is built directly from the input query.
max_evaluated_plans: Option<u32>Query planning is an exploratory process. Depending on the specificities and feature used by subgraphs, there could exist may different theoretical valid (if not always efficient) plans for a given query, and at a high level, the query planner generates those possible choices, evaluate them, and return the best one. In some complex cases however, the number of theoretically possible plans can be very large, and to keep query planning time acceptable, the query planner cap the maximum number of plans it evaluates. This config allows to configure that cap. Note if planning a query hits that cap, then the planner will still always return a “correct” plan, but it may not return the optimal one, so this config can be considered a trade-off between the worst-time for query planning computation processing, and the risk of having non-optimal query plans (impacting query runtimes).
This value currently defaults to 10 000, but this default is considered an implementation detail and is subject to change. We do not recommend setting this value unless it is to debug a specific issue (with unexpectedly slow query planning for instance). Remember that setting this value too low can negatively affect query runtime (due to the use of sub-optimal query plans).
paths_limit: Option<u32>Before creating query plans, for each path of fields in the query we compute all the possible options to traverse that path via the subgraphs. Multiple options can arise because fields in the path can be provided by multiple subgraphs, and abstract types (i.e. unions and interfaces) returned by fields sometimes require the query planner to traverse through each constituent object type. The number of options generated in this computation can grow large if the schema or query are sufficiently complex, and that will increase the time spent planning.
This config allows specifying a per-path limit to the number of options considered. If any path’s options exceeds this limit, query planning will abort and the operation will fail.
The default value is None, which specifies no limit.
Trait Implementations§
Source§impl Clone for QueryPlannerDebugConfig
impl Clone for QueryPlannerDebugConfig
Source§fn clone(&self) -> QueryPlannerDebugConfig
fn clone(&self) -> QueryPlannerDebugConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for QueryPlannerDebugConfig
impl Debug for QueryPlannerDebugConfig
Source§impl Default for QueryPlannerDebugConfig
impl Default for QueryPlannerDebugConfig
Source§fn default() -> QueryPlannerDebugConfig
fn default() -> QueryPlannerDebugConfig
Source§impl Hash for QueryPlannerDebugConfig
impl Hash for QueryPlannerDebugConfig
Source§impl PartialEq for QueryPlannerDebugConfig
impl PartialEq for QueryPlannerDebugConfig
Source§impl Serialize for QueryPlannerDebugConfig
impl Serialize for QueryPlannerDebugConfig
impl Eq for QueryPlannerDebugConfig
impl StructuralPartialEq for QueryPlannerDebugConfig
Auto Trait Implementations§
impl Freeze for QueryPlannerDebugConfig
impl RefUnwindSafe for QueryPlannerDebugConfig
impl Send for QueryPlannerDebugConfig
impl Sync for QueryPlannerDebugConfig
impl Unpin for QueryPlannerDebugConfig
impl UnwindSafe for QueryPlannerDebugConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.