Skip to main content

BeforeDataSourceRequestFunction()

BeforeDataSourceRequestFunction: (params) => Promise<object>

Modify query to change how data is fetched from database. Return ok: false and error: string to stop execution and show error message to user. Return ok: true to continue execution.

Parameters

ParameterType
paramsobject
params.adminUserAdminUser
params.extraobject
params.extra.bodyany
params.extra.cookiesRecord<string, string>
params.extra.headersRecord<string, string>
params.extra.queryRecord<string, string>
params.queryany
params.resourceAdminForthResource

Returns

Promise<object>

error?

optional error: string

ok

ok: boolean