Add DestroyMany to graphql query runner (#7507)
## Context destroyMany was not implemented, this PR adds it
This commit is contained in:
@ -13,6 +13,7 @@ import {
|
||||
CreateOneResolverArgs,
|
||||
DeleteManyResolverArgs,
|
||||
DeleteOneResolverArgs,
|
||||
DestroyManyResolverArgs,
|
||||
DestroyOneResolverArgs,
|
||||
FindDuplicatesResolverArgs,
|
||||
FindManyResolverArgs,
|
||||
@ -285,6 +286,25 @@ export class GraphqlQueryRunnerService {
|
||||
return result;
|
||||
}
|
||||
|
||||
@LogExecutionTime()
|
||||
async destroyMany<ObjectRecord extends IRecord>(
|
||||
args: DestroyManyResolverArgs,
|
||||
options: WorkspaceQueryRunnerOptions,
|
||||
): Promise<ObjectRecord[]> {
|
||||
const result = await this.executeQuery<
|
||||
DestroyManyResolverArgs,
|
||||
ObjectRecord[]
|
||||
>('destroyMany', args, options);
|
||||
|
||||
this.apiEventEmitterService.emitDestroyEvents(
|
||||
result,
|
||||
options.authContext,
|
||||
options.objectMetadataItem,
|
||||
);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@LogExecutionTime()
|
||||
public async restoreMany<ObjectRecord extends IRecord>(
|
||||
args: RestoreManyResolverArgs,
|
||||
|
||||
Reference in New Issue
Block a user