[−][src]Trait juniper_eager_loading::GraphqlNodeForModel
A GraphQL type backed by a model object.
You shouldn't need to implement this trait yourself even when customizing eager loading.
Associated Types
type Model: Clone
The model type.
type Id: 'static + Hash + Eq
The id type the model uses.
type Context
Your Juniper context type.
This will typically contain a database connection or a connection to some external API.
type Error
The error type.
Required methods
fn new_from_model(model: &Self::Model) -> Self
Create a new GraphQL type from a model.
Provided methods
fn from_db_models(models: &[Self::Model]) -> Vec<Self>
Create a list of GraphQL types from a list of models.