@ -7,7 +7,6 @@ import { loggerModuleFactory } from 'src/integrations/logger/logger.module-facto
|
|||||||
import { JobsModule } from 'src/integrations/message-queue/jobs.module';
|
import { JobsModule } from 'src/integrations/message-queue/jobs.module';
|
||||||
import { MessageQueueModule } from 'src/integrations/message-queue/message-queue.module';
|
import { MessageQueueModule } from 'src/integrations/message-queue/message-queue.module';
|
||||||
import { messageQueueModuleFactory } from 'src/integrations/message-queue/message-queue.module-factory';
|
import { messageQueueModuleFactory } from 'src/integrations/message-queue/message-queue.module-factory';
|
||||||
import { FetchMessagesJob } from 'src/workspace/messaging/jobs/fetch-messages.job';
|
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
|
|||||||
@ -24,7 +24,9 @@ export class DeleteManyQueryFactory {
|
|||||||
mutation {
|
mutation {
|
||||||
deleteFrom${
|
deleteFrom${
|
||||||
options.targetTableName
|
options.targetTableName
|
||||||
}Collection(filter: ${stringifyWithoutKeyQuote(args.filter)}, atMost: 30) {
|
}Collection(filter: ${stringifyWithoutKeyQuote(
|
||||||
|
args.filter,
|
||||||
|
)}, atMost: 30) {
|
||||||
affectedCount
|
affectedCount
|
||||||
records {
|
records {
|
||||||
${fieldsString}
|
${fieldsString}
|
||||||
|
|||||||
@ -35,10 +35,15 @@ export class UpdateManyQueryFactory {
|
|||||||
options.fieldMetadataCollection,
|
options.fieldMetadataCollection,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const argsData = {
|
||||||
|
...computedArgs.data,
|
||||||
|
updatedAt: new Date().toISOString(),
|
||||||
|
};
|
||||||
|
|
||||||
return `
|
return `
|
||||||
mutation {
|
mutation {
|
||||||
update${options.targetTableName}Collection(
|
update${options.targetTableName}Collection(
|
||||||
set: ${stringifyWithoutKeyQuote(computedArgs.data)},
|
set: ${stringifyWithoutKeyQuote(argsData)},
|
||||||
filter: ${stringifyWithoutKeyQuote(args.filter)},
|
filter: ${stringifyWithoutKeyQuote(args.filter)},
|
||||||
) {
|
) {
|
||||||
affectedCount
|
affectedCount
|
||||||
|
|||||||
@ -31,12 +31,17 @@ export class UpdateOneQueryFactory {
|
|||||||
options.fieldMetadataCollection,
|
options.fieldMetadataCollection,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const argsData = {
|
||||||
|
...computedArgs.data,
|
||||||
|
updatedAt: new Date().toISOString(),
|
||||||
|
};
|
||||||
|
|
||||||
return `
|
return `
|
||||||
mutation {
|
mutation {
|
||||||
update${
|
update${
|
||||||
options.targetTableName
|
options.targetTableName
|
||||||
}Collection(set: ${stringifyWithoutKeyQuote(
|
}Collection(set: ${stringifyWithoutKeyQuote(
|
||||||
computedArgs.data,
|
argsData,
|
||||||
)}, filter: { id: { eq: "${computedArgs.id}" } }) {
|
)}, filter: { id: { eq: "${computedArgs.id}" } }) {
|
||||||
affectedCount
|
affectedCount
|
||||||
records {
|
records {
|
||||||
|
|||||||
Reference in New Issue
Block a user