| method | Description | Example |
|---|---|---|
| interval(ms) | Defines a recurring task executed every 'ms' milliseconds. | |
| process(ReturnType) | Defines a background process queue handled by a worker. | |
Defines a recurring task executed every 'ms' milliseconds.
Defines a background process queue handled by a worker.
| method | Description | Example |
|---|---|---|
| query(ReturnType, options?) | Defines a GraphQL Query or HTTP GET endpoint. | |
| mutation(ReturnType, options?) | Defines a GraphQL Mutation or HTTP POST endpoint. | |
| message(ReturnType, options?) | Defines a WebSocket message handler. | |
| pubsub(payloadType) | Defines a PubSub topic handler. | |
Defines a GraphQL Query or HTTP GET endpoint.
Defines a GraphQL Mutation or HTTP POST endpoint.
Defines a WebSocket message handler.
Defines a PubSub topic handler.
| field | Description | Example |
|---|---|---|
| .param(name, Type, options?) | Required path parameter. (Available in: Query, Mutation, Process) | |
| .search(name, Type, options?) | Query string or optional argument. (Available in: Query, Mutation) | |
| .body(name, Type, options?) | Request body parameter. (Available in: Mutation) | |
| .msg(name, Type, options?) | Message payload field. (Available in: Message) | |
| .room(name, Type, options?) | PubSub room identifier. (Available in: PubSub) | |
Required path parameter. (Available in: Query, Mutation, Process)
Query string or optional argument. (Available in: Query, Mutation)
Request body parameter. (Available in: Mutation)
Message payload field. (Available in: Message)
PubSub room identifier. (Available in: PubSub)
| method | Description | Example |
|---|---|---|
| view[Model](id: string): Promise<ViewReturn> | Fetch detail view data. Returns { [Model], [Model]View }. | |
| edit[Model](id: string): Promise<EditReturn> | Fetch data for editing. Returns { [Model], [Model]Edit }. | |
| merge[Model](id: string | null, data: Partial<Model>): Promise<Model> | Create or Update model data. Returns updated Model. | |
Fetch detail view data. Returns { [Model], [Model]View }.
Fetch data for editing. Returns { [Model], [Model]Edit }.
Create or Update model data. Returns updated Model.
| method | Description | Example |
|---|---|---|
| [Model]List[Suffix](...args, skip, limit, sort): Promise<Model[]> | Get list of data with pagination arguments. Returns Model array. | |
| [Model]Insight[Suffix](...args): Promise<Insight> | Get aggregated statistics. Returns Insight object. | |
| init[Model](query?, option?): Promise<InitReturn> | Initialize list with default options. Returns { [Model]Init, [Model]List, [Model]Insight }. | |
| init[SliceName](...args): Promise<InitReturn> | Initialize slice list data. Returns { [Slice]Init, [Slice]List, [Slice]Insight }. | |
Get list of data with pagination arguments. Returns Model array.
Get aggregated statistics. Returns Insight object.
Initialize list with default options. Returns { [Model]Init, [Model]List, [Model]Insight }.
Initialize slice list data. Returns { [Slice]Init, [Slice]List, [Slice]Insight }.
| method | Description | Example |
|---|---|---|
| canActivate(context) | Returns boolean indicating if the request is allowed. | |
| getRequest(context) | Helper to extract the request object, including the user account. | |
Returns boolean indicating if the request is allowed.
Helper to extract the request object, including the user account.