API Reference / modelence / client / callMethodDocumentation Index
Fetch the complete documentation index at: https://docs.modelence.com/llms.txt
Use this file to discover all available pages before exploring further.
callMethod<Defined in: packages/modelence/src/client/method.ts:58 Calls a server-side method (query or mutation) defined on a Modelence module. BothT>(methodName,args?,options?):Promise<T>
args and options are optional. Use the type parameter T to type the return value.
Example
Type Parameters
| Type Parameter | Default type |
|---|---|
T | unknown |
Parameters
| Parameter | Type | Description |
|---|---|---|
methodName | string | Fully qualified method name, e.g. 'todo.getAll'. |
args? | MethodArgs | Arguments passed to the server-side method. Defaults to {}. |
options? | CallMethodOptions | Call-site options such as a custom CallMethodOptions.errorHandler. Defaults to {}. |
Returns
Promise<T>
A promise that resolves to the method’s return value.