Entity View Configuration
For any of the index, show, edit, create views you can specify:
| Option | type | description |
|---|---|---|
| query | QueryFn | the GraphQL API call to prepare the rendering of the view |
| actionCallbacks | ActionCallbackType[] | additional Actions that should be offered on the view |
query
Per default the generated query will include all data needed to render the default views. This would include
- items / item data
- parent data
- lookup data for forms
If your view needs other data you can provide your own query here.
export type QueryFn = (args:QueryFnArgs) => string|object
export type QueryFnArgs = {
parent?:ParentType
filter?:any
sort?:any
paging?:any
id?:string
}Configuration for Actions
For more information how to configure a view for a specific action see:
| Action View | |
|---|---|
| index | list of all (probably filtered) entity items |
| show | view of a specific entity item |
| edit | form for editing an existing entity item's attributes and assocTo, assocToMany relations |
| create | form for a new entity item's attributes and assocTo, assocToMany relations |