Field Extensions
EntityGraphQL provides field extension methods for modifying you field expressions with common use cases, such as paging collections.
The following highlights the provided field extensions in EntityGraphQL available as well as an introduction to creating your own.
UseFilterto add expression based filtering to collectionsUseSortto add asortargument to your collections- Paging
UseConnectionPagingfor paging collectionsUseOffsetPagingfor paging collections
UseAggregateto expose aggregate data (countplusmin/max/sum/average) over collections- Creating your own Field Extensions
When combining multiple extensions together on a single field order matters. The correct order is for the provided extensions is
Filter -> Sort -> Paging -> Aggregate
UseAggregate goes last because by default it adapts to the shape produced by the extensions before it: if the field is paged it attaches an aggregate field to the paging result, otherwise it wraps the field as { items, aggregate }. An additive, non-breaking sibling {field}Aggregate field is also available as an opt-in. See UseAggregate for the placement options.