Expand description
This module contains all functionality that is needed to implement a wundergraph entity
In general wundergraph entities should be implemented using the provided custom derive. Only for cases where the default implementation does not your requirements a manual implementation should be done.
§Deriving
See the documentation of WundergraphEntity for possible options.
§Manual implementation
Double check that a manual implementation is really required and could not
be replaced by using the provided derive + QueryModifier
For a manual implementation of a wundergraph entity it is required to implement at least the following traits for your type:
LoadingHandlerWundergraphGraphqlMapper- For each foreign key field
WundergraphBelongsTo BuildFilterHelperif you use your entity somewhere as part of a filter
See the documentation of the corresponding traits on details about the actual implementation
Modules§
- fields
- This module contains helper types to work with fields of wundergraph entities
- filter
- This module contains data structures to build a generic graphql interface to
filter entities. The main entry point is the
Filterstruct
Traits§
- Loading
Handler - Main entry point for loading database entities as GraphQL objects
- Query
Modifier - A trait to modify the query generated by the default
LoadingHandlerimplementation
Type Aliases§
- Boxed
Query - A helper type to simplify the select statement query type for a given loading handler.
- SqlType
OfPlaceholder - A helper type that represents the diesel sql type of a given entity
Derive Macros§
- Wundergraph
Entity - A custom derive to implement all wundergraph related traits for a entity
Using this trait implies internally
#[derive(WundergraphBelongsTo)]and#[derive(BuildFilterHelper)]