Open
Description
How to use QueryService within a database transaction? In particular, with TypeORM.
@Mutation(() => EntityDTO)
async updateOneEntity(
@Args('input') input: UpdateOneEntityDTO,
): Promise<EntityDTO> {
return await this.dbConnection.transaction(async manager => {
// How do I make `this.service` use the `manager`?
const entity = await this.service.updateOne(
input.id,
input.update,
)
// TODO Make an API call
return entity
})
}