pub struct QueryPlannerConfig {
pub incremental_delivery: Option<IncrementalDeliverySupport>,
pub graphql_validation: bool,
pub reuse_query_fragments: Option<bool>,
pub generate_query_fragments: Option<bool>,
pub debug: Option<QueryPlannerDebugConfig>,
pub type_conditioned_fetching: bool,
}Expand description
Query planner configuration
Fields§
§incremental_delivery: Option<IncrementalDeliverySupport>Option for @defer directive support
graphql_validation: boolWhether to validate GraphQL schema and query text
reuse_query_fragments: Option<bool>Whether the query planner should try to reused the named fragments of the planned query in subgraph fetches.
This is often a good idea as it can prevent very large subgraph queries in some cases (named fragments can make some relatively small queries (using said fragments) expand to a very large query if all the spreads are inline). However, due to architecture of the query planner, this optimization is done as an additional pass on the subgraph queries of the generated plan and can thus increase the latency of building a plan. As long as query plans are sufficiently cached, this should not be a problem, which is why this option is enabled by default, but if the distribution of inbound queries prevents efficient caching of query plans, this may become an undesirable trade-off and can be disabled in that case.
Defaults to true in the JS query planner. Defaults to None here in order to defer to the JS query
planner’s default.
generate_query_fragments: Option<bool>If enabled, the query planner will extract inline fragments into fragment definitions before sending queries to subgraphs. This can significantly reduce the size of the query sent to subgraphs, but may increase the time it takes to plan the query.
debug: Option<QueryPlannerDebugConfig>A sub-set of configurations that are meant for debugging or testing. All the configurations in this sub-set are provided without guarantees of stability (they may be dangerous) or continued support (they may be removed without warning).
type_conditioned_fetching: boolEnables type conditioned fetching. This flag is a workaround, which may yield significant performance degradation when computing query plans, and increase query plan size.
If you aren’t aware of this flag, you probably don’t need it. Defaults to false.
Trait Implementations§
Source§impl Clone for QueryPlannerConfig
impl Clone for QueryPlannerConfig
Source§fn clone(&self) -> QueryPlannerConfig
fn clone(&self) -> QueryPlannerConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for QueryPlannerConfig
impl Debug for QueryPlannerConfig
Source§impl Default for QueryPlannerConfig
impl Default for QueryPlannerConfig
Source§impl Hash for QueryPlannerConfig
impl Hash for QueryPlannerConfig
Source§impl PartialEq for QueryPlannerConfig
impl PartialEq for QueryPlannerConfig
Source§impl Serialize for QueryPlannerConfig
impl Serialize for QueryPlannerConfig
impl Eq for QueryPlannerConfig
impl StructuralPartialEq for QueryPlannerConfig
Auto Trait Implementations§
impl Freeze for QueryPlannerConfig
impl RefUnwindSafe for QueryPlannerConfig
impl Send for QueryPlannerConfig
impl Sync for QueryPlannerConfig
impl Unpin for QueryPlannerConfig
impl UnwindSafe for QueryPlannerConfig
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.