[−][src]Module wundergraph::query_builder::selection
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:
LoadingHandler
WundergraphGraphqlMapper
- For each foreign key field
WundergraphBelongsTo
BuildFilterHelper
if 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 |
Traits
LoadingHandler | Main entry point for loading database entities as GraphQL objects |
QueryModifier | A trait to modify the query generated by the default |
Type Definitions
BoxedQuery | A helper type to simplify the select statement query type for a given loading handler. |
SqlTypeOfPlaceholder | A helper type that represents the diesel sql type of a given entity |
Derive Macros
WundergraphEntity | A custom derive to implement all wundergraph related traits for a entity
Using this trait implies internally |