[−][src]Trait juniper_eager_loading::EagerLoadAllChildren
The main entry point trait for doing eager loading.
You shouldn't need to implement this trait yourself even when customizing eager loading.
Required methods
fn eager_load_all_children_for_each(
nodes: &mut [Self],
models: &[Self::Model],
db: &Self::Connection,
trail: &QueryTrail<Self, Walked>
) -> Result<(), Self::Error>
nodes: &mut [Self],
models: &[Self::Model],
db: &Self::Connection,
trail: &QueryTrail<Self, Walked>
) -> Result<(), Self::Error>
For each field in your GraphQL type that implements EagerLoadChildrenOfType
call
eager_load_children
to do eager loading of that field.
This is the function you should call for eager loading values for a GraphQL field that returns a list.
Provided methods
fn eager_load_all_children(
node: Self,
models: &[Self::Model],
db: &Self::Connection,
trail: &QueryTrail<Self, Walked>
) -> Result<Self, Self::Error>
node: Self,
models: &[Self::Model],
db: &Self::Connection,
trail: &QueryTrail<Self, Walked>
) -> Result<Self, Self::Error>
Perform eager loading for a single GraphQL value.
This is the function you should call for eager loading associations of a single value.