mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-22 21:50:43 +03:00
Refactor backend folder structure (#4505)
* Refactor backend folder structure Co-authored-by: Charles Bochet <charles@twenty.com> * fix tests * fix * move yoga hooks --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
parent
afb9b3e375
commit
2c09096edd
@ -4,7 +4,7 @@ module.exports = {
|
||||
clearMocks: true,
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
|
||||
modulePathIgnorePatterns: ['<rootDir>/dist'],
|
||||
moduleFileExtensions: ['js', 'json', 'ts'],
|
||||
moduleNameMapper: {
|
||||
'^src/(.*)': '<rootDir>/src/$1',
|
||||
|
@ -28,8 +28,8 @@
|
||||
"database:seed:dev": "npx nx command -- workspace:seed:dev",
|
||||
"database:seed:demo": "npx nx command -- workspace:seed:demo",
|
||||
"database:reset": "npx nx database:truncate && npx nx database:init",
|
||||
"command": "node dist/src/command",
|
||||
"queue:work": "node dist/src/queue-worker"
|
||||
"command": "node dist/src/command/command",
|
||||
"queue:work": "node dist/src/queue-worker/queue-worker"
|
||||
},
|
||||
"dependencies": {
|
||||
"@graphql-yoga/nestjs": "patch:@graphql-yoga/nestjs@2.1.0#./patches/@graphql-yoga+nestjs+2.1.0.patch",
|
||||
|
@ -22,7 +22,7 @@
|
||||
],
|
||||
"options": {
|
||||
"cwd": "packages/twenty-server",
|
||||
"command": "node dist/src/command.js"
|
||||
"command": "node dist/src/command/command.js"
|
||||
}
|
||||
},
|
||||
"test:debug": {
|
||||
|
@ -1,29 +0,0 @@
|
||||
import { DeleteQueryFactory } from 'src/api/rest/api-rest-query-builder/factories/delete-query.factory';
|
||||
import { CreateQueryFactory } from 'src/api/rest/api-rest-query-builder/factories/create-query.factory';
|
||||
import { UpdateQueryFactory } from 'src/api/rest/api-rest-query-builder/factories/update-query.factory';
|
||||
import { FindOneQueryFactory } from 'src/api/rest/api-rest-query-builder/factories/find-one-query.factory';
|
||||
import { FindManyQueryFactory } from 'src/api/rest/api-rest-query-builder/factories/find-many-query.factory';
|
||||
import { DeleteVariablesFactory } from 'src/api/rest/api-rest-query-builder/factories/delete-variables.factory';
|
||||
import { CreateVariablesFactory } from 'src/api/rest/api-rest-query-builder/factories/create-variables.factory';
|
||||
import { UpdateVariablesFactory } from 'src/api/rest/api-rest-query-builder/factories/update-variables.factory';
|
||||
import { GetVariablesFactory } from 'src/api/rest/api-rest-query-builder/factories/get-variables.factory';
|
||||
import { LastCursorInputFactory } from 'src/api/rest/api-rest-query-builder/factories/input-factories/last-cursor-input.factory';
|
||||
import { LimitInputFactory } from 'src/api/rest/api-rest-query-builder/factories/input-factories/limit-input.factory';
|
||||
import { OrderByInputFactory } from 'src/api/rest/api-rest-query-builder/factories/input-factories/order-by-input.factory';
|
||||
import { FilterInputFactory } from 'src/api/rest/api-rest-query-builder/factories/input-factories/filter-input.factory';
|
||||
|
||||
export const apiRestQueryBuilderFactories = [
|
||||
DeleteQueryFactory,
|
||||
CreateQueryFactory,
|
||||
UpdateQueryFactory,
|
||||
FindOneQueryFactory,
|
||||
FindManyQueryFactory,
|
||||
DeleteVariablesFactory,
|
||||
CreateVariablesFactory,
|
||||
UpdateVariablesFactory,
|
||||
GetVariablesFactory,
|
||||
LastCursorInputFactory,
|
||||
LimitInputFactory,
|
||||
OrderByInputFactory,
|
||||
FilterInputFactory,
|
||||
];
|
@ -1,25 +0,0 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
import { Request } from 'express';
|
||||
|
||||
import { addDefaultConjunctionIfMissing } from 'src/api/rest/api-rest-query-builder/factories/input-factories/filter-utils/add-default-conjunction.utils';
|
||||
import { checkFilterQuery } from 'src/api/rest/api-rest-query-builder/factories/input-factories/filter-utils/check-filter-query.utils';
|
||||
import { parseFilter } from 'src/api/rest/api-rest-query-builder/factories/input-factories/filter-utils/parse-filter.utils';
|
||||
import { FieldValue } from 'src/api/rest/types/api-rest-field-value.type';
|
||||
|
||||
@Injectable()
|
||||
export class FilterInputFactory {
|
||||
create(request: Request, objectMetadata): Record<string, FieldValue> {
|
||||
let filterQuery = request.query.filter;
|
||||
|
||||
if (typeof filterQuery !== 'string') {
|
||||
return {};
|
||||
}
|
||||
|
||||
checkFilterQuery(filterQuery);
|
||||
|
||||
filterQuery = addDefaultConjunctionIfMissing(filterQuery);
|
||||
|
||||
return parseFilter(filterQuery, objectMetadata.objectMetadataItem);
|
||||
}
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
import {
|
||||
fieldCurrency,
|
||||
fieldLink,
|
||||
fieldNumber,
|
||||
fieldString,
|
||||
objectMetadataItem,
|
||||
} from 'src/utils/utils-test/object-metadata-item';
|
||||
import { mapFieldMetadataToGraphqlQuery } from 'src/api/rest/api-rest-query-builder/utils/map-field-metadata-to-graphql-query.utils';
|
||||
|
||||
describe('mapFieldMetadataToGraphqlQuery', () => {
|
||||
it('should map properly', () => {
|
||||
expect(
|
||||
mapFieldMetadataToGraphqlQuery(objectMetadataItem, fieldNumber),
|
||||
).toEqual('fieldNumber');
|
||||
expect(
|
||||
mapFieldMetadataToGraphqlQuery(objectMetadataItem, fieldString),
|
||||
).toEqual('fieldString');
|
||||
expect(mapFieldMetadataToGraphqlQuery(objectMetadataItem, fieldLink))
|
||||
.toEqual(`
|
||||
fieldLink
|
||||
{
|
||||
label
|
||||
url
|
||||
}
|
||||
`);
|
||||
expect(mapFieldMetadataToGraphqlQuery(objectMetadataItem, fieldCurrency))
|
||||
.toEqual(`
|
||||
fieldCurrency
|
||||
{
|
||||
amountMicros
|
||||
currencyCode
|
||||
}
|
||||
`);
|
||||
});
|
||||
});
|
@ -1,17 +0,0 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { HttpModule } from '@nestjs/axios';
|
||||
|
||||
import { ApiRestController } from 'src/api/rest/api-rest.controller';
|
||||
import { ApiRestService } from 'src/api/rest/api-rest.service';
|
||||
import { ApiRestQueryBuilderModule } from 'src/api/rest/api-rest-query-builder/api-rest-query-builder.module';
|
||||
import { AuthModule } from 'src/engine/modules/auth/auth.module';
|
||||
import { ApiRestMetadataController } from 'src/api/rest/metadata-rest.controller';
|
||||
import { ApiRestMetadataService } from 'src/api/rest/metadata-rest.service';
|
||||
|
||||
@Module({
|
||||
imports: [ApiRestQueryBuilderModule, AuthModule, HttpModule],
|
||||
controllers: [ApiRestMetadataController, ApiRestController],
|
||||
providers: [ApiRestMetadataService, ApiRestService],
|
||||
exports: [ApiRestMetadataService],
|
||||
})
|
||||
export class ApiRestModule {}
|
@ -9,12 +9,12 @@ import { join } from 'path';
|
||||
import { YogaDriver, YogaDriverConfig } from '@graphql-yoga/nestjs';
|
||||
|
||||
import { GraphQLConfigService } from 'src/engine-graphql-config/graphql-config.service';
|
||||
import { ApiRestModule } from 'src/api/rest/api-rest.module';
|
||||
import { BusinessModule } from 'src/business/modules/business.module';
|
||||
import { ApiRestModule } from 'src/engine/api/rest/api-rest.module';
|
||||
import { ModulesModule } from 'src/modules/modules.module';
|
||||
|
||||
import { FoundationModule } from './engine/modules/foundation.module';
|
||||
import { IntegrationsModule } from './integrations/integrations.module';
|
||||
import { WorkspaceModule } from './engine/graphql/workspace.module';
|
||||
import { EngineModulesModule } from './engine/modules/engine-modules.module';
|
||||
import { IntegrationsModule } from './engine/integrations/integrations.module';
|
||||
import { CoreGraphqlApiModule } from './engine/api/graphql/core-graphql-api.module';
|
||||
import { GraphQLConfigModule } from './engine-graphql-config/graphql-config.module';
|
||||
|
||||
@Module({
|
||||
@ -27,14 +27,14 @@ import { GraphQLConfigModule } from './engine-graphql-config/graphql-config.modu
|
||||
}),
|
||||
GraphQLModule.forRootAsync<YogaDriverConfig>({
|
||||
driver: YogaDriver,
|
||||
imports: [FoundationModule, GraphQLConfigModule],
|
||||
imports: [EngineModulesModule, GraphQLConfigModule],
|
||||
useClass: GraphQLConfigService,
|
||||
}),
|
||||
IntegrationsModule,
|
||||
FoundationModule,
|
||||
BusinessModule,
|
||||
EngineModulesModule,
|
||||
ModulesModule,
|
||||
ApiRestModule,
|
||||
WorkspaceModule,
|
||||
CoreGraphqlApiModule,
|
||||
...AppModule.getConditionalModules(),
|
||||
],
|
||||
})
|
||||
|
@ -1,11 +0,0 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { CalendarModule } from 'src/business/modules/calendar/calendar.module';
|
||||
import { MessagingModule } from 'src/business/modules/message/messaging.module';
|
||||
|
||||
@Module({
|
||||
imports: [MessagingModule, CalendarModule],
|
||||
providers: [],
|
||||
exports: [],
|
||||
})
|
||||
export class BusinessModule {}
|
@ -1,41 +0,0 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
|
||||
import { FeatureFlagEntity } from 'src/engine/modules/feature-flag/feature-flag.entity';
|
||||
import { EnvironmentModule } from 'src/integrations/environment/environment.module';
|
||||
import { CreateCompaniesAndContactsModule } from 'src/engine-workspace/auto-companies-and-contacts-creation/create-company-and-contact/create-company-and-contact.module';
|
||||
import { BlocklistModule } from 'src/business/modules/calendar-and-messaging/repositories/blocklist/blocklist.module';
|
||||
import { ConnectedAccountModule } from 'src/business/modules/calendar-and-messaging/repositories/connected-account/connected-account.module';
|
||||
import { CalendarChannelEventAssociationModule } from 'src/business/modules/calendar/repositories/calendar-channel-event-association/calendar-channel-event-assocation.module';
|
||||
import { CalendarChannelModule } from 'src/business/modules/calendar/repositories/calendar-channel/calendar-channel.module';
|
||||
import { CalendarEventAttendeeModule } from 'src/business/modules/calendar/repositories/calendar-event-attendee/calendar-event-attendee.module';
|
||||
import { CalendarEventModule } from 'src/business/modules/calendar/repositories/calendar-event/calendar-event.module';
|
||||
import { CalendarEventCleanerModule } from 'src/business/modules/calendar/services/calendar-event-cleaner/calendar-event-cleaner.module';
|
||||
import { GoogleCalendarFullSyncService } from 'src/business/modules/calendar/services/google-calendar-full-sync.service';
|
||||
import { GoogleCalendarClientProvider } from 'src/business/modules/calendar/services/providers/google-calendar/google-calendar.provider';
|
||||
import { CompanyModule } from 'src/business/modules/message/repositories/company/company.module';
|
||||
import { PersonModule } from 'src/engine-workspace/repositories/person/person.module';
|
||||
import { WorkspaceMemberModule } from 'src/engine-workspace/repositories/workspace-member/workspace-member.module';
|
||||
import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/workspace-datasource.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
EnvironmentModule,
|
||||
WorkspaceDataSourceModule,
|
||||
ConnectedAccountModule,
|
||||
CalendarChannelModule,
|
||||
CalendarChannelEventAssociationModule,
|
||||
CalendarEventModule,
|
||||
CalendarEventAttendeeModule,
|
||||
CreateCompaniesAndContactsModule,
|
||||
WorkspaceMemberModule,
|
||||
TypeOrmModule.forFeature([FeatureFlagEntity], 'core'),
|
||||
CompanyModule,
|
||||
PersonModule,
|
||||
BlocklistModule,
|
||||
CalendarEventCleanerModule,
|
||||
],
|
||||
providers: [GoogleCalendarFullSyncService, GoogleCalendarClientProvider],
|
||||
exports: [GoogleCalendarFullSyncService],
|
||||
})
|
||||
export class CalendarModule {}
|
@ -1,11 +0,0 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { EnvironmentModule } from 'src/integrations/environment/environment.module';
|
||||
import { GoogleCalendarClientProvider } from 'src/business/modules/calendar/services/providers/google-calendar/google-calendar.provider';
|
||||
|
||||
@Module({
|
||||
imports: [EnvironmentModule],
|
||||
providers: [GoogleCalendarClientProvider],
|
||||
exports: [GoogleCalendarClientProvider],
|
||||
})
|
||||
export class CalendarProvidersModule {}
|
@ -1,76 +0,0 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { HttpModule } from '@nestjs/axios';
|
||||
|
||||
import { ConnectedAccountModule } from 'src/business/modules/calendar-and-messaging/repositories/connected-account/connected-account.module';
|
||||
import { MessageChannelMessageAssociationModule } from 'src/business/modules/message/repositories/message-channel-message-association/message-channel-message-assocation.module';
|
||||
import { MessageChannelModule } from 'src/business/modules/message/repositories/message-channel/message-channel.module';
|
||||
import { MessageThreadModule } from 'src/business/modules/message/repositories/message-thread/message-thread.module';
|
||||
import { EnvironmentModule } from 'src/integrations/environment/environment.module';
|
||||
import { MessagingPersonListener } from 'src/business/modules/message/listeners/messaging-person.listener';
|
||||
import { MessageModule } from 'src/business/modules/message/repositories/message/message.module';
|
||||
import { GmailClientProvider } from 'src/business/modules/message/services/providers/gmail/gmail-client.provider';
|
||||
import { CreateContactService } from 'src/engine-workspace/auto-companies-and-contacts-creation/create-contact/create-contact.service';
|
||||
import { CreateCompanyService } from 'src/engine-workspace/auto-companies-and-contacts-creation/create-company/create-company.service';
|
||||
import { FetchMessagesByBatchesService } from 'src/business/modules/message/services/fetch-messages-by-batches.service';
|
||||
import { GmailFullSyncService } from 'src/business/modules/message/services/gmail-full-sync.service';
|
||||
import { GmailPartialSyncService } from 'src/business/modules/message/services/gmail-partial-sync.service';
|
||||
import { GoogleAPIsRefreshAccessTokenService } from 'src/business/modules/calendar-and-messaging/services/google-apis-refresh-access-token.service';
|
||||
import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/workspace-datasource.module';
|
||||
import { MessageParticipantModule } from 'src/business/modules/message/repositories/message-participant/message-participant.module';
|
||||
import { MessagingWorkspaceMemberListener } from 'src/business/modules/message/listeners/messaging-workspace-member.listener';
|
||||
import { MessagingMessageChannelListener } from 'src/business/modules/message/listeners/messaging-message-channel.listener';
|
||||
import { MessageService } from 'src/business/modules/message/repositories/message/message.service';
|
||||
import { WorkspaceMemberModule } from 'src/engine-workspace/repositories/workspace-member/workspace-member.module';
|
||||
import { FeatureFlagEntity } from 'src/engine/modules/feature-flag/feature-flag.entity';
|
||||
import { CreateCompaniesAndContactsModule } from 'src/engine-workspace/auto-companies-and-contacts-creation/create-company-and-contact/create-company-and-contact.module';
|
||||
import { CompanyModule } from 'src/business/modules/message/repositories/company/company.module';
|
||||
import { PersonModule } from 'src/engine-workspace/repositories/person/person.module';
|
||||
import { SaveMessagesAndCreateContactsService } from 'src/business/modules/message/services/save-messages-and-create-contacts.service';
|
||||
import { MessagingConnectedAccountListener } from 'src/business/modules/message/listeners/messaging-connected-account.listener';
|
||||
import { BlocklistModule } from 'src/business/modules/calendar-and-messaging/repositories/blocklist/blocklist.module';
|
||||
import { FetchByBatchesService } from 'src/business/modules/message/services/fetch-by-batch.service';
|
||||
@Module({
|
||||
imports: [
|
||||
EnvironmentModule,
|
||||
WorkspaceDataSourceModule,
|
||||
ConnectedAccountModule,
|
||||
MessageChannelModule,
|
||||
MessageChannelMessageAssociationModule,
|
||||
MessageModule,
|
||||
MessageThreadModule,
|
||||
MessageParticipantModule,
|
||||
CreateCompaniesAndContactsModule,
|
||||
WorkspaceMemberModule,
|
||||
TypeOrmModule.forFeature([FeatureFlagEntity], 'core'),
|
||||
CompanyModule,
|
||||
PersonModule,
|
||||
BlocklistModule,
|
||||
HttpModule.register({
|
||||
baseURL: 'https://www.googleapis.com/batch/gmail/v1',
|
||||
}),
|
||||
],
|
||||
providers: [
|
||||
GmailFullSyncService,
|
||||
GmailPartialSyncService,
|
||||
FetchMessagesByBatchesService,
|
||||
GoogleAPIsRefreshAccessTokenService,
|
||||
GmailClientProvider,
|
||||
CreateContactService,
|
||||
CreateCompanyService,
|
||||
MessagingPersonListener,
|
||||
MessagingWorkspaceMemberListener,
|
||||
MessagingMessageChannelListener,
|
||||
MessageService,
|
||||
SaveMessagesAndCreateContactsService,
|
||||
MessagingConnectedAccountListener,
|
||||
FetchByBatchesService,
|
||||
],
|
||||
exports: [
|
||||
GmailPartialSyncService,
|
||||
GmailFullSyncService,
|
||||
GoogleAPIsRefreshAccessTokenService,
|
||||
FetchByBatchesService,
|
||||
],
|
||||
})
|
||||
export class MessagingModule {}
|
@ -1,28 +0,0 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { MessageFindManyPreQueryHook } from 'src/business/modules/message/query-hooks/message/message-find-many.pre-query.hook';
|
||||
import { MessageFindOnePreQueryHook } from 'src/business/modules/message/query-hooks/message/message-find-one.pre-query-hook';
|
||||
import { ConnectedAccountModule } from 'src/business/modules/calendar-and-messaging/repositories/connected-account/connected-account.module';
|
||||
import { MessageChannelMessageAssociationModule } from 'src/business/modules/message/repositories/message-channel-message-association/message-channel-message-assocation.module';
|
||||
import { MessageChannelModule } from 'src/business/modules/message/repositories/message-channel/message-channel.module';
|
||||
import { WorkspaceMemberModule } from 'src/engine-workspace/repositories/workspace-member/workspace-member.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
MessageChannelMessageAssociationModule,
|
||||
MessageChannelModule,
|
||||
ConnectedAccountModule,
|
||||
WorkspaceMemberModule,
|
||||
],
|
||||
providers: [
|
||||
{
|
||||
provide: MessageFindOnePreQueryHook.name,
|
||||
useClass: MessageFindOnePreQueryHook,
|
||||
},
|
||||
{
|
||||
provide: MessageFindManyPreQueryHook.name,
|
||||
useClass: MessageFindManyPreQueryHook,
|
||||
},
|
||||
],
|
||||
})
|
||||
export class MessagingQueryHookModule {}
|
@ -1,23 +0,0 @@
|
||||
import { Module, forwardRef } from '@nestjs/common';
|
||||
|
||||
import { MessageChannelModule } from 'src/business/modules/message/repositories/message-channel/message-channel.module';
|
||||
import { MessageChannelMessageAssociationModule } from 'src/business/modules/message/repositories/message-channel-message-association/message-channel-message-assocation.module';
|
||||
import { MessageParticipantModule } from 'src/business/modules/message/repositories/message-participant/message-participant.module';
|
||||
import { MessageThreadModule } from 'src/business/modules/message/repositories/message-thread/message-thread.module';
|
||||
import { MessageService } from 'src/business/modules/message/repositories/message/message.service';
|
||||
import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/workspace-datasource.module';
|
||||
import { CreateCompaniesAndContactsModule } from 'src/engine-workspace/auto-companies-and-contacts-creation/create-company-and-contact/create-company-and-contact.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
WorkspaceDataSourceModule,
|
||||
forwardRef(() => MessageThreadModule),
|
||||
MessageParticipantModule,
|
||||
MessageChannelMessageAssociationModule,
|
||||
MessageChannelModule,
|
||||
CreateCompaniesAndContactsModule,
|
||||
],
|
||||
providers: [MessageService],
|
||||
exports: [MessageService],
|
||||
})
|
||||
export class MessageModule {}
|
@ -1,11 +0,0 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { EnvironmentModule } from 'src/integrations/environment/environment.module';
|
||||
import { GmailClientProvider } from 'src/business/modules/message/services/providers/gmail/gmail-client.provider';
|
||||
|
||||
@Module({
|
||||
imports: [EnvironmentModule],
|
||||
providers: [GmailClientProvider],
|
||||
exports: [GmailClientProvider],
|
||||
})
|
||||
export class MessagingProvidersModule {}
|
@ -1,15 +1,13 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { DatabaseCommandModule } from 'src/database/commands/database-command.module';
|
||||
import { FetchWorkspaceMessagesCommandsModule } from 'src/business/modules/message/commands/fetch-workspace-messages-commands.module';
|
||||
import { FetchWorkspaceMessagesCommandsModule } from 'src/modules/messaging/commands/fetch-workspace-messages-commands.module';
|
||||
import { WorkspaceHealthCommandModule } from 'src/engine/workspace-manager/workspace-health/commands/workspace-health-command.module';
|
||||
import { WorkspaceCleanerModule } from 'src/engine/workspace-manager/workspace-cleaner/workspace-cleaner.module';
|
||||
import { WorkspaceCalendarSyncCommandsModule } from 'src/business/modules/calendar/commands/workspace-calendar-sync-commands.module';
|
||||
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
import { WorkspaceSyncMetadataCommandsModule } from './engine/workspace-manager/workspace-sync-metadata/commands/workspace-sync-metadata-commands.module';
|
||||
import { WorkspaceMigrationRunnerCommandsModule } from './engine/workspace-manager/workspace-migration-runner/commands/workspace-sync-metadata-commands.module';
|
||||
import { WorkspaceCalendarSyncCommandsModule } from 'src/modules/calendar/commands/workspace-calendar-sync-commands.module';
|
||||
import { AppModule } from 'src/app.module';
|
||||
import { WorkspaceMigrationRunnerCommandsModule } from 'src/engine/workspace-manager/workspace-migration-runner/commands/workspace-sync-metadata-commands.module';
|
||||
import { WorkspaceSyncMetadataCommandsModule } from 'src/engine/workspace-manager/workspace-sync-metadata/commands/workspace-sync-metadata-commands.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
@ -1,10 +1,10 @@
|
||||
import { CommandFactory } from 'nest-commander';
|
||||
|
||||
import { CommandModule } from './command.module';
|
||||
import { filterException } from 'src/engine/filters/utils/global-exception-handler.util';
|
||||
import { ExceptionHandlerService } from 'src/engine/integrations/exception-handler/exception-handler.service';
|
||||
import { LoggerService } from 'src/engine/integrations/logger/logger.service';
|
||||
|
||||
import { LoggerService } from './integrations/logger/logger.service';
|
||||
import { ExceptionHandlerService } from './integrations/exception-handler/exception-handler.service';
|
||||
import { filterException } from './engine/filters/utils/global-exception-handler.util';
|
||||
import { CommandModule } from './command.module';
|
||||
|
||||
async function bootstrap() {
|
||||
const errorHandler = (err: Error) => {
|
@ -4,8 +4,8 @@ import { Command, CommandRunner } from 'nest-commander';
|
||||
|
||||
import { dataSeedDemoWorkspaceCronPattern } from 'src/database/commands/data-seed-demo-workspace/crons/data-seed-demo-workspace-cron-pattern';
|
||||
import { DataSeedDemoWorkspaceJob } from 'src/database/commands/data-seed-demo-workspace/jobs/data-seed-demo-workspace.job';
|
||||
import { MessageQueue } from 'src/integrations/message-queue/message-queue.constants';
|
||||
import { MessageQueueService } from 'src/integrations/message-queue/services/message-queue.service';
|
||||
import { MessageQueue } from 'src/engine/integrations/message-queue/message-queue.constants';
|
||||
import { MessageQueueService } from 'src/engine/integrations/message-queue/services/message-queue.service';
|
||||
|
||||
@Command({
|
||||
name: 'workspace-seed-demo:cron:start',
|
||||
|
@ -4,8 +4,8 @@ import { Command, CommandRunner } from 'nest-commander';
|
||||
|
||||
import { dataSeedDemoWorkspaceCronPattern } from 'src/database/commands/data-seed-demo-workspace/crons/data-seed-demo-workspace-cron-pattern';
|
||||
import { DataSeedDemoWorkspaceJob } from 'src/database/commands/data-seed-demo-workspace/jobs/data-seed-demo-workspace.job';
|
||||
import { MessageQueue } from 'src/integrations/message-queue/message-queue.constants';
|
||||
import { MessageQueueService } from 'src/integrations/message-queue/services/message-queue.service';
|
||||
import { MessageQueue } from 'src/engine/integrations/message-queue/message-queue.constants';
|
||||
import { MessageQueueService } from 'src/engine/integrations/message-queue/services/message-queue.service';
|
||||
|
||||
@Command({
|
||||
name: 'workspace-seed-demo:cron:stop',
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { EnvironmentModule } from 'src/integrations/environment/environment.module';
|
||||
import { EnvironmentModule } from 'src/engine/integrations/environment/environment.module';
|
||||
import { WorkspaceManagerModule } from 'src/engine/workspace-manager/workspace-manager.module';
|
||||
import { DataSeedDemoWorkspaceService } from 'src/database/commands/data-seed-demo-workspace/services/data-seed-demo-workspace.service';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
import { MessageQueueJob } from 'src/integrations/message-queue/interfaces/message-queue-job.interface';
|
||||
import { MessageQueueJob } from 'src/engine/integrations/message-queue/interfaces/message-queue-job.interface';
|
||||
|
||||
import { DataSeedDemoWorkspaceService } from 'src/database/commands/data-seed-demo-workspace/services/data-seed-demo-workspace.service';
|
||||
|
||||
|
@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common';
|
||||
|
||||
import { DataSource } from 'typeorm';
|
||||
|
||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
|
||||
import { EnvironmentService } from 'src/engine/integrations/environment/environment.service';
|
||||
import { WorkspaceManagerService } from 'src/engine/workspace-manager/workspace-manager.service';
|
||||
import {
|
||||
deleteCoreSchema,
|
||||
|
@ -10,11 +10,11 @@ import { seedPipelineStep } from 'src/database/typeorm-seeds/workspace/pipeline-
|
||||
import { seedWorkspaceMember } from 'src/database/typeorm-seeds/workspace/workspaceMember';
|
||||
import { seedPeople } from 'src/database/typeorm-seeds/workspace/people';
|
||||
import { seedCoreSchema } from 'src/database/typeorm-seeds/core';
|
||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
|
||||
import { seedCalendarEvents } from 'src/database/typeorm-seeds/workspace/calendar-events';
|
||||
import { ObjectMetadataService } from 'src/engine-metadata/object-metadata/object-metadata.service';
|
||||
import { WorkspaceDataSourceService } from 'src/engine/workspace-datasource/workspace-datasource.service';
|
||||
import { WorkspaceSyncMetadataService } from 'src/engine/workspace-manager/workspace-sync-metadata/workspace-sync-metadata.service';
|
||||
import { seedCalendarEvents } from 'src/database/typeorm-seeds/workspace/calendar-events';
|
||||
import { EnvironmentService } from 'src/engine/integrations/environment/environment.service';
|
||||
|
||||
// TODO: implement dry-run
|
||||
@Command({
|
||||
|
@ -2,7 +2,7 @@ import { Module } from '@nestjs/common';
|
||||
import { TypeOrmModule, TypeOrmModuleOptions } from '@nestjs/typeorm';
|
||||
|
||||
import { typeORMCoreModuleOptions } from 'src/database/typeorm/core/core.datasource';
|
||||
import { EnvironmentModule } from 'src/integrations/environment/environment.module';
|
||||
import { EnvironmentModule } from 'src/engine/integrations/environment/environment.module';
|
||||
|
||||
import { TypeORMService } from './typeorm.service';
|
||||
|
||||
|
@ -2,7 +2,7 @@ import { Injectable, OnModuleDestroy, OnModuleInit } from '@nestjs/common';
|
||||
|
||||
import { DataSource } from 'typeorm';
|
||||
|
||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
|
||||
import { EnvironmentService } from 'src/engine/integrations/environment/environment.service';
|
||||
import { DataSourceEntity } from 'src/engine-metadata/data-source/data-source.entity';
|
||||
import { User } from 'src/engine/modules/user/user.entity';
|
||||
import { Workspace } from 'src/engine/modules/workspace/workspace.entity';
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { FoundationModule } from 'src/engine/modules/foundation.module';
|
||||
import { EngineModulesModule } from 'src/engine/modules/engine-modules.module';
|
||||
import { graphQLFactories } from 'src/engine-graphql-config/factories';
|
||||
|
||||
@Module({
|
||||
imports: [FoundationModule],
|
||||
imports: [EngineModulesModule],
|
||||
providers: [...graphQLFactories],
|
||||
exports: [...graphQLFactories],
|
||||
})
|
||||
|
@ -13,18 +13,18 @@ import { GraphQLSchemaWithContext, YogaInitialContext } from 'graphql-yoga';
|
||||
import * as Sentry from '@sentry/node';
|
||||
|
||||
import { TokenService } from 'src/engine/modules/auth/services/token.service';
|
||||
import { FoundationModule } from 'src/engine/modules/foundation.module';
|
||||
import { EngineModulesModule } from 'src/engine/modules/engine-modules.module';
|
||||
import { Workspace } from 'src/engine/modules/workspace/workspace.entity';
|
||||
import { WorkspaceFactory } from 'src/engine/graphql/workspace.factory';
|
||||
import { ExceptionHandlerService } from 'src/integrations/exception-handler/exception-handler.service';
|
||||
import { WorkspaceFactory } from 'src/engine/api/graphql/workspace.factory';
|
||||
import { ExceptionHandlerService } from 'src/engine/integrations/exception-handler/exception-handler.service';
|
||||
import { handleExceptionAndConvertToGraphQLError } from 'src/engine/filters/utils/global-exception-handler.util';
|
||||
import { renderApolloPlayground } from 'src/engine-workspace/utils/render-apollo-playground.util';
|
||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
|
||||
import { useExceptionHandler } from 'src/integrations/exception-handler/hooks/use-exception-handler.hook';
|
||||
import { renderApolloPlayground } from 'src/engine/utils/render-apollo-playground.util';
|
||||
import { EnvironmentService } from 'src/engine/integrations/environment/environment.service';
|
||||
import { useExceptionHandler } from 'src/engine/integrations/exception-handler/hooks/use-exception-handler.hook';
|
||||
import { User } from 'src/engine/modules/user/user.entity';
|
||||
import { useThrottler } from 'src/integrations/throttler/hooks/use-throttler';
|
||||
import { useThrottler } from 'src/engine-graphql-config/hooks/use-throttler';
|
||||
import { JwtData } from 'src/engine/modules/auth/types/jwt-data.type';
|
||||
import { useSentryTracing } from 'src/integrations/tracing/useSentryTracing';
|
||||
import { useSentryTracing } from 'src/engine/integrations/exception-handler/hooks/use-sentry-tracing';
|
||||
|
||||
import { CreateContextFactory } from './factories/create-context.factory';
|
||||
|
||||
@ -67,7 +67,7 @@ export class GraphQLConfigService
|
||||
const config: YogaDriverConfig = {
|
||||
context: (context) => this.createContextFactory.create(context),
|
||||
autoSchemaFile: true,
|
||||
include: [FoundationModule],
|
||||
include: [EngineModulesModule],
|
||||
conditionalSchema: async (context) => {
|
||||
let user: User | undefined;
|
||||
let workspace: Workspace | undefined;
|
||||
|
@ -23,7 +23,7 @@ import { TypeORMService } from 'src/database/typeorm/typeorm.service';
|
||||
import { DataSourceService } from 'src/engine-metadata/data-source/data-source.service';
|
||||
import { UpdateFieldInput } from 'src/engine-metadata/field-metadata/dtos/update-field.input';
|
||||
import { WorkspaceMigrationFactory } from 'src/engine-metadata/workspace-migration/workspace-migration.factory';
|
||||
import { computeObjectTargetTable } from 'src/engine-workspace/utils/compute-object-target-table.util';
|
||||
import { computeObjectTargetTable } from 'src/engine/utils/compute-object-target-table.util';
|
||||
import { generateMigrationName } from 'src/engine-metadata/workspace-migration/utils/generate-migration-name.util';
|
||||
import { generateNullable } from 'src/engine-metadata/field-metadata/utils/generate-nullable';
|
||||
import { FieldMetadataDTO } from 'src/engine-metadata/field-metadata/dtos/field-metadata.dto';
|
||||
|
@ -2,12 +2,12 @@ import { YogaDriverConfig } from '@graphql-yoga/nestjs';
|
||||
import GraphQLJSON from 'graphql-type-json';
|
||||
|
||||
import { CreateContextFactory } from 'src/engine-graphql-config/factories/create-context.factory';
|
||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
|
||||
import { ExceptionHandlerService } from 'src/integrations/exception-handler/exception-handler.service';
|
||||
import { useExceptionHandler } from 'src/integrations/exception-handler/hooks/use-exception-handler.hook';
|
||||
import { useThrottler } from 'src/integrations/throttler/hooks/use-throttler';
|
||||
import { EnvironmentService } from 'src/engine/integrations/environment/environment.service';
|
||||
import { ExceptionHandlerService } from 'src/engine/integrations/exception-handler/exception-handler.service';
|
||||
import { useExceptionHandler } from 'src/engine/integrations/exception-handler/hooks/use-exception-handler.hook';
|
||||
import { useThrottler } from 'src/engine-graphql-config/hooks/use-throttler';
|
||||
import { MetadataModule } from 'src/engine-metadata/metadata.module';
|
||||
import { renderApolloPlayground } from 'src/engine-workspace/utils/render-apollo-playground.util';
|
||||
import { renderApolloPlayground } from 'src/engine/utils/render-apollo-playground.util';
|
||||
|
||||
export const metadataModuleFactory = async (
|
||||
environmentService: EnvironmentService,
|
||||
|
@ -6,8 +6,8 @@ import { YogaDriverConfig, YogaDriver } from '@graphql-yoga/nestjs';
|
||||
import { WorkspaceMigrationRunnerModule } from 'src/engine/workspace-manager/workspace-migration-runner/workspace-migration-runner.module';
|
||||
import { WorkspaceMigrationModule } from 'src/engine-metadata/workspace-migration/workspace-migration.module';
|
||||
import { metadataModuleFactory } from 'src/engine-metadata/metadata.module-factory';
|
||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
|
||||
import { ExceptionHandlerService } from 'src/integrations/exception-handler/exception-handler.service';
|
||||
import { EnvironmentService } from 'src/engine/integrations/environment/environment.service';
|
||||
import { ExceptionHandlerService } from 'src/engine/integrations/exception-handler/exception-handler.service';
|
||||
import { GraphQLConfigModule } from 'src/engine-graphql-config/graphql-config.module';
|
||||
import { CreateContextFactory } from 'src/engine-graphql-config/factories/create-context.factory';
|
||||
|
||||
|
@ -30,8 +30,8 @@ import {
|
||||
RelationMetadataType,
|
||||
RelationOnDeleteAction,
|
||||
} from 'src/engine-metadata/relation-metadata/relation-metadata.entity';
|
||||
import { computeCustomName } from 'src/engine-workspace/utils/compute-custom-name.util';
|
||||
import { computeObjectTargetTable } from 'src/engine-workspace/utils/compute-object-target-table.util';
|
||||
import { computeCustomName } from 'src/engine/utils/compute-custom-name.util';
|
||||
import { computeObjectTargetTable } from 'src/engine/utils/compute-object-target-table.util';
|
||||
import { DeleteOneObjectInput } from 'src/engine-metadata/object-metadata/dtos/delete-object.input';
|
||||
import { RelationToDelete } from 'src/engine-metadata/relation-metadata/types/relation-to-delete';
|
||||
import { generateMigrationName } from 'src/engine-metadata/workspace-migration/utils/generate-migration-name.util';
|
||||
|
@ -20,7 +20,7 @@ import { FieldMetadataType } from 'src/engine-metadata/field-metadata/field-meta
|
||||
import { WorkspaceMigrationColumnActionType } from 'src/engine-metadata/workspace-migration/workspace-migration.entity';
|
||||
import { ObjectMetadataEntity } from 'src/engine-metadata/object-metadata/object-metadata.entity';
|
||||
import { createCustomColumnName } from 'src/engine-metadata/utils/create-custom-column-name.util';
|
||||
import { computeObjectTargetTable } from 'src/engine-workspace/utils/compute-object-target-table.util';
|
||||
import { computeObjectTargetTable } from 'src/engine/utils/compute-object-target-table.util';
|
||||
import { createRelationForeignKeyColumnName } from 'src/engine-metadata/relation-metadata/utils/create-relation-foreign-key-column-name.util';
|
||||
import { generateMigrationName } from 'src/engine-metadata/workspace-migration/utils/generate-migration-name.util';
|
||||
|
||||
|
@ -1,21 +0,0 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { PersonModule } from 'src/engine-workspace/repositories/person/person.module';
|
||||
import { WorkspaceMemberModule } from 'src/engine-workspace/repositories/workspace-member/workspace-member.module';
|
||||
import { CreateCompanyAndContactService } from 'src/engine-workspace/auto-companies-and-contacts-creation/create-company-and-contact/create-company-and-contact.service';
|
||||
import { CreateCompanyModule } from 'src/engine-workspace/auto-companies-and-contacts-creation/create-company/create-company.module';
|
||||
import { CreateContactModule } from 'src/engine-workspace/auto-companies-and-contacts-creation/create-contact/create-contact.module';
|
||||
import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/workspace-datasource.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
WorkspaceDataSourceModule,
|
||||
CreateContactModule,
|
||||
CreateCompanyModule,
|
||||
WorkspaceMemberModule,
|
||||
PersonModule,
|
||||
],
|
||||
providers: [CreateCompanyAndContactService],
|
||||
exports: [CreateCompanyAndContactService],
|
||||
})
|
||||
export class CreateCompaniesAndContactsModule {}
|
@ -1,21 +0,0 @@
|
||||
import { FieldMetadataInterface } from 'src/engine-metadata/field-metadata/interfaces/field-metadata.interface';
|
||||
|
||||
import { FieldMetadataEntity } from 'src/engine-metadata/field-metadata/field-metadata.entity';
|
||||
import { isCompositeFieldMetadataType } from 'src/engine-metadata/field-metadata/utils/is-composite-field-metadata-type.util';
|
||||
import { BasicFieldMetadataType } from 'src/engine-metadata/workspace-migration/factories/basic-column-action.factory';
|
||||
|
||||
import { computeCustomName } from './compute-custom-name.util';
|
||||
|
||||
export const computeFieldTargetColumn = (
|
||||
fieldMetadata:
|
||||
| FieldMetadataEntity<BasicFieldMetadataType>
|
||||
| FieldMetadataInterface<BasicFieldMetadataType>,
|
||||
) => {
|
||||
if (isCompositeFieldMetadataType(fieldMetadata.type)) {
|
||||
throw new Error(
|
||||
"Composite field metadata should not be computed here, as they're split into multiple fields.",
|
||||
);
|
||||
}
|
||||
|
||||
return computeCustomName(fieldMetadata.name, fieldMetadata.isCustom ?? false);
|
||||
};
|
@ -1,7 +1,7 @@
|
||||
import { FieldMetadataType } from 'src/engine-metadata/field-metadata/field-metadata.entity';
|
||||
import { ObjectMetadataEntity } from 'src/engine-metadata/object-metadata/object-metadata.entity';
|
||||
|
||||
export const fieldNumber = {
|
||||
export const fieldNumberMock = {
|
||||
name: 'fieldNumber',
|
||||
type: FieldMetadataType.NUMBER,
|
||||
isNullable: false,
|
||||
@ -9,7 +9,7 @@ export const fieldNumber = {
|
||||
targetColumnMap: { value: 'fieldNumber' },
|
||||
};
|
||||
|
||||
export const fieldString = {
|
||||
export const fieldStringMock = {
|
||||
name: 'fieldString',
|
||||
type: FieldMetadataType.TEXT,
|
||||
isNullable: true,
|
||||
@ -17,7 +17,7 @@ export const fieldString = {
|
||||
targetColumnMap: { value: 'fieldString' },
|
||||
};
|
||||
|
||||
export const fieldLink = {
|
||||
export const fieldLinkMock = {
|
||||
name: 'fieldLink',
|
||||
type: FieldMetadataType.LINK,
|
||||
isNullable: false,
|
||||
@ -25,7 +25,7 @@ export const fieldLink = {
|
||||
targetColumnMap: { label: 'fieldLinkLabel', url: 'fieldLinkUrl' },
|
||||
};
|
||||
|
||||
export const fieldCurrency = {
|
||||
export const fieldCurrencyMock = {
|
||||
name: 'fieldCurrency',
|
||||
type: FieldMetadataType.CURRENCY,
|
||||
isNullable: true,
|
||||
@ -36,9 +36,9 @@ export const fieldCurrency = {
|
||||
},
|
||||
};
|
||||
|
||||
export const objectMetadataItem: DeepPartial<ObjectMetadataEntity> = {
|
||||
export const objectMetadataItemMock: DeepPartial<ObjectMetadataEntity> = {
|
||||
targetTableName: 'testingObject',
|
||||
nameSingular: 'objectName',
|
||||
namePlural: 'objectsName',
|
||||
fields: [fieldNumber, fieldString, fieldLink, fieldCurrency],
|
||||
fields: [fieldNumberMock, fieldStringMock, fieldLinkMock, fieldCurrencyMock],
|
||||
};
|
@ -2,12 +2,11 @@ import { Test, TestingModule } from '@nestjs/testing';
|
||||
|
||||
import { DataSourceService } from 'src/engine-metadata/data-source/data-source.service';
|
||||
import { ObjectMetadataService } from 'src/engine-metadata/object-metadata/object-metadata.service';
|
||||
import { WorkspaceSchemaStorageService } from 'src/engine/graphql/workspace-schema-storage/workspace-schema-storage.service';
|
||||
import { ScalarsExplorerService } from 'src/engine-workspace/services/scalars-explorer.service';
|
||||
import { WorkspaceResolverFactory } from 'src/engine/graphql/workspace-resolver-builder/workspace-resolver.factory';
|
||||
import { WorkspaceGraphQLSchemaFactory } from 'src/engine/graphql/workspace-schema-builder/workspace-graphql-schema.factory';
|
||||
|
||||
import { WorkspaceFactory } from './workspace.factory';
|
||||
import { WorkspaceSchemaStorageService } from 'src/engine/api/graphql/workspace-schema-storage/workspace-schema-storage.service';
|
||||
import { ScalarsExplorerService } from 'src/engine/api/graphql/services/scalars-explorer.service';
|
||||
import { WorkspaceResolverFactory } from 'src/engine/api/graphql/workspace-resolver-builder/workspace-resolver.factory';
|
||||
import { WorkspaceGraphQLSchemaFactory } from 'src/engine/api/graphql/workspace-schema-builder/workspace-graphql-schema.factory';
|
||||
import { WorkspaceFactory } from 'src/engine/api/graphql/workspace.factory';
|
||||
|
||||
describe('WorkspaceFactory', () => {
|
||||
let service: WorkspaceFactory;
|
@ -2,11 +2,11 @@ import { Module } from '@nestjs/common';
|
||||
|
||||
import { MetadataModule } from 'src/engine-metadata/metadata.module';
|
||||
import { DataSourceModule } from 'src/engine-metadata/data-source/data-source.module';
|
||||
import { WorkspaceSchemaStorageModule } from 'src/engine/graphql/workspace-schema-storage/workspace-schema-storage.module';
|
||||
import { WorkspaceSchemaStorageModule } from 'src/engine/api/graphql/workspace-schema-storage/workspace-schema-storage.module';
|
||||
import { ObjectMetadataModule } from 'src/engine-metadata/object-metadata/object-metadata.module';
|
||||
import { ScalarsExplorerService } from 'src/engine-workspace/services/scalars-explorer.service';
|
||||
import { WorkspaceSchemaBuilderModule } from 'src/engine/graphql/workspace-schema-builder/workspace-schema-builder.module';
|
||||
import { WorkspaceResolverBuilderModule } from 'src/engine/graphql/workspace-resolver-builder/workspace-resolver-builder.module';
|
||||
import { ScalarsExplorerService } from 'src/engine/api/graphql/services/scalars-explorer.service';
|
||||
import { WorkspaceSchemaBuilderModule } from 'src/engine/api/graphql/workspace-schema-builder/workspace-schema-builder.module';
|
||||
import { WorkspaceResolverBuilderModule } from 'src/engine/api/graphql/workspace-resolver-builder/workspace-resolver-builder.module';
|
||||
|
||||
import { WorkspaceFactory } from './workspace.factory';
|
||||
|
||||
@ -22,4 +22,4 @@ import { WorkspaceFactory } from './workspace.factory';
|
||||
providers: [WorkspaceFactory, ScalarsExplorerService],
|
||||
exports: [WorkspaceFactory],
|
||||
})
|
||||
export class WorkspaceModule {}
|
||||
export class CoreGraphqlApiModule {}
|
@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common';
|
||||
|
||||
import { GraphQLScalarType, GraphQLSchema, isScalarType } from 'graphql';
|
||||
|
||||
import { scalars } from 'src/engine/graphql/workspace-schema-builder/graphql-types/scalars';
|
||||
import { scalars } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
||||
|
||||
@Injectable()
|
||||
export class ScalarsExplorerService {
|
@ -0,0 +1,13 @@
|
||||
import { GraphQLResolveInfo } from 'graphql';
|
||||
|
||||
import { ObjectMetadataInterface } from 'src/engine-metadata/field-metadata/interfaces/object-metadata.interface';
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/api/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
|
||||
import { objectMetadataItemMock } from 'src/engine/api/__mocks__/object-metadata-item.mock';
|
||||
|
||||
export const workspaceQueryBuilderOptionsMock: WorkspaceQueryBuilderOptions = {
|
||||
fieldMetadataCollection: [],
|
||||
info: {} as GraphQLResolveInfo,
|
||||
objectMetadataCollection: [],
|
||||
objectMetadataItem: objectMetadataItemMock as ObjectMetadataInterface,
|
||||
};
|
@ -1,7 +1,7 @@
|
||||
import { TestingModule, Test } from '@nestjs/testing';
|
||||
|
||||
import { ArgsAliasFactory } from 'src/engine/graphql/workspace-query-builder/factories/args-alias.factory';
|
||||
import { ArgsStringFactory } from 'src/engine/graphql/workspace-query-builder/factories/args-string.factory';
|
||||
import { ArgsAliasFactory } from 'src/engine/api/graphql/workspace-query-builder/factories/args-alias.factory';
|
||||
import { ArgsStringFactory } from 'src/engine/api/graphql/workspace-query-builder/factories/args-string.factory';
|
||||
|
||||
describe('ArgsStringFactory', () => {
|
||||
let service: ArgsStringFactory;
|
@ -1,12 +1,12 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
|
||||
import { RecordFilter } from 'src/engine/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import { FindDuplicatesResolverArgs } from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { RecordFilter } from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import { FindDuplicatesResolverArgs } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
|
||||
import { ArgsAliasFactory } from 'src/engine/graphql/workspace-query-builder/factories/args-alias.factory';
|
||||
import { FieldsStringFactory } from 'src/engine/graphql/workspace-query-builder/factories/fields-string.factory';
|
||||
import { FindDuplicatesQueryFactory } from 'src/engine/graphql/workspace-query-builder/factories/find-duplicates-query.factory';
|
||||
import { workspaceQueryBuilderOptions } from 'src/engine/graphql/workspace-query-builder/utils-test/workspace-query-builder-options';
|
||||
import { ArgsAliasFactory } from 'src/engine/api/graphql/workspace-query-builder/factories/args-alias.factory';
|
||||
import { FieldsStringFactory } from 'src/engine/api/graphql/workspace-query-builder/factories/fields-string.factory';
|
||||
import { FindDuplicatesQueryFactory } from 'src/engine/api/graphql/workspace-query-builder/factories/find-duplicates-query.factory';
|
||||
import { workspaceQueryBuilderOptionsMock } from 'src/engine/api/graphql/workspace-query-builder/__mocks__/workspace-query-builder-options.mock';
|
||||
|
||||
describe('FindDuplicatesQueryFactory', () => {
|
||||
let service: FindDuplicatesQueryFactory;
|
||||
@ -48,7 +48,10 @@ describe('FindDuplicatesQueryFactory', () => {
|
||||
it('should return (first: 0) as a filter when args are missing', async () => {
|
||||
const args: FindDuplicatesResolverArgs<RecordFilter> = {};
|
||||
|
||||
const query = await service.create(args, workspaceQueryBuilderOptions);
|
||||
const query = await service.create(
|
||||
args,
|
||||
workspaceQueryBuilderOptionsMock,
|
||||
);
|
||||
|
||||
expect(query.trim()).toEqual(`query {
|
||||
objectNameCollection(first: 0) {
|
||||
@ -73,9 +76,9 @@ describe('FindDuplicatesQueryFactory', () => {
|
||||
};
|
||||
|
||||
const query = await service.create(args, {
|
||||
...workspaceQueryBuilderOptions,
|
||||
...workspaceQueryBuilderOptionsMock,
|
||||
objectMetadataItem: {
|
||||
...workspaceQueryBuilderOptions.objectMetadataItem,
|
||||
...workspaceQueryBuilderOptionsMock.objectMetadataItem,
|
||||
nameSingular: 'person',
|
||||
},
|
||||
});
|
||||
@ -101,9 +104,9 @@ describe('FindDuplicatesQueryFactory', () => {
|
||||
};
|
||||
|
||||
const query = await service.create(args, {
|
||||
...workspaceQueryBuilderOptions,
|
||||
...workspaceQueryBuilderOptionsMock,
|
||||
objectMetadataItem: {
|
||||
...workspaceQueryBuilderOptions.objectMetadataItem,
|
||||
...workspaceQueryBuilderOptionsMock.objectMetadataItem,
|
||||
nameSingular: 'person',
|
||||
},
|
||||
});
|
||||
@ -129,9 +132,9 @@ describe('FindDuplicatesQueryFactory', () => {
|
||||
};
|
||||
|
||||
const query = await service.create(args, {
|
||||
...workspaceQueryBuilderOptions,
|
||||
...workspaceQueryBuilderOptionsMock,
|
||||
objectMetadataItem: {
|
||||
...workspaceQueryBuilderOptions.objectMetadataItem,
|
||||
...workspaceQueryBuilderOptionsMock.objectMetadataItem,
|
||||
nameSingular: 'person',
|
||||
},
|
||||
});
|
||||
@ -155,9 +158,9 @@ describe('FindDuplicatesQueryFactory', () => {
|
||||
const query = await service.create(
|
||||
args,
|
||||
{
|
||||
...workspaceQueryBuilderOptions,
|
||||
...workspaceQueryBuilderOptionsMock,
|
||||
objectMetadataItem: {
|
||||
...workspaceQueryBuilderOptions.objectMetadataItem,
|
||||
...workspaceQueryBuilderOptionsMock.objectMetadataItem,
|
||||
nameSingular: 'person',
|
||||
},
|
||||
},
|
||||
@ -178,9 +181,9 @@ describe('FindDuplicatesQueryFactory', () => {
|
||||
describe('buildQueryForExistingRecord', () => {
|
||||
it(`should include all the fields that exist for person inside "duplicateCriteriaCollection" constant`, async () => {
|
||||
const query = service.buildQueryForExistingRecord('uuid', {
|
||||
...workspaceQueryBuilderOptions,
|
||||
...workspaceQueryBuilderOptionsMock,
|
||||
objectMetadataItem: {
|
||||
...workspaceQueryBuilderOptions.objectMetadataItem,
|
||||
...workspaceQueryBuilderOptionsMock.objectMetadataItem,
|
||||
nameSingular: 'person',
|
||||
},
|
||||
});
|
@ -1,7 +1,7 @@
|
||||
import {
|
||||
RecordPositionQueryFactory,
|
||||
RecordPositionQueryType,
|
||||
} from 'src/engine/graphql/workspace-query-builder/factories/record-position-query.factory';
|
||||
} from 'src/engine/api/graphql/workspace-query-builder/factories/record-position-query.factory';
|
||||
|
||||
describe('RecordPositionQueryFactory', () => {
|
||||
const objectMetadataItem = {
|
@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common';
|
||||
|
||||
import { FieldMetadataInterface } from 'src/engine-metadata/field-metadata/interfaces/field-metadata.interface';
|
||||
|
||||
import { stringifyWithoutKeyQuote } from 'src/engine/graphql/workspace-query-builder/utils/stringify-without-key-quote.util';
|
||||
import { stringifyWithoutKeyQuote } from 'src/engine/api/graphql/workspace-query-builder/utils/stringify-without-key-quote.util';
|
||||
|
||||
import { ArgsAliasFactory } from './args-alias.factory';
|
||||
|
@ -2,12 +2,12 @@ import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
import { Record as IRecord } from 'src/engine/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import { CreateManyResolverArgs } from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/api/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
import { Record as IRecord } from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import { CreateManyResolverArgs } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
|
||||
import { stringifyWithoutKeyQuote } from 'src/engine/graphql/workspace-query-builder/utils/stringify-without-key-quote.util';
|
||||
import { computeObjectTargetTable } from 'src/engine-workspace/utils/compute-object-target-table.util';
|
||||
import { stringifyWithoutKeyQuote } from 'src/engine/api/graphql/workspace-query-builder/utils/stringify-without-key-quote.util';
|
||||
import { computeObjectTargetTable } from 'src/engine/utils/compute-object-target-table.util';
|
||||
|
||||
import { FieldsStringFactory } from './fields-string.factory';
|
||||
import { ArgsAliasFactory } from './args-alias.factory';
|
@ -1,10 +1,10 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
import { DeleteManyResolverArgs } from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/api/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
import { DeleteManyResolverArgs } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
|
||||
import { stringifyWithoutKeyQuote } from 'src/engine/graphql/workspace-query-builder/utils/stringify-without-key-quote.util';
|
||||
import { computeObjectTargetTable } from 'src/engine-workspace/utils/compute-object-target-table.util';
|
||||
import { stringifyWithoutKeyQuote } from 'src/engine/api/graphql/workspace-query-builder/utils/stringify-without-key-quote.util';
|
||||
import { computeObjectTargetTable } from 'src/engine/utils/compute-object-target-table.util';
|
||||
|
||||
import { FieldsStringFactory } from './fields-string.factory';
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
import { DeleteOneResolverArgs } from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/api/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
import { DeleteOneResolverArgs } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
|
||||
import { computeObjectTargetTable } from 'src/engine-workspace/utils/compute-object-target-table.util';
|
||||
import { computeObjectTargetTable } from 'src/engine/utils/compute-object-target-table.util';
|
||||
|
||||
import { FieldsStringFactory } from './fields-string.factory';
|
||||
|
@ -7,7 +7,7 @@ import isEmpty from 'lodash.isempty';
|
||||
import { FieldMetadataInterface } from 'src/engine-metadata/field-metadata/interfaces/field-metadata.interface';
|
||||
import { ObjectMetadataInterface } from 'src/engine-metadata/field-metadata/interfaces/object-metadata.interface';
|
||||
|
||||
import { isRelationFieldMetadataType } from 'src/engine-workspace/utils/is-relation-field-metadata-type.util';
|
||||
import { isRelationFieldMetadataType } from 'src/engine/utils/is-relation-field-metadata-type.util';
|
||||
|
||||
import { FieldAliasFactory } from './field-alias.factory';
|
||||
import { RelationFieldAliasFactory } from './relation-field-alias.factory';
|
@ -2,15 +2,15 @@ import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import isEmpty from 'lodash.isempty';
|
||||
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
import { RecordFilter } from 'src/engine/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import { FindDuplicatesResolverArgs } from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/api/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
import { RecordFilter } from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import { FindDuplicatesResolverArgs } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { ObjectMetadataInterface } from 'src/engine-metadata/field-metadata/interfaces/object-metadata.interface';
|
||||
|
||||
import { computeObjectTargetTable } from 'src/engine-workspace/utils/compute-object-target-table.util';
|
||||
import { stringifyWithoutKeyQuote } from 'src/engine/graphql/workspace-query-builder/utils/stringify-without-key-quote.util';
|
||||
import { ArgsAliasFactory } from 'src/engine/graphql/workspace-query-builder/factories/args-alias.factory';
|
||||
import { duplicateCriteriaCollection } from 'src/engine/graphql/workspace-resolver-builder/constants/duplicate-criteria.constants';
|
||||
import { computeObjectTargetTable } from 'src/engine/utils/compute-object-target-table.util';
|
||||
import { stringifyWithoutKeyQuote } from 'src/engine/api/graphql/workspace-query-builder/utils/stringify-without-key-quote.util';
|
||||
import { ArgsAliasFactory } from 'src/engine/api/graphql/workspace-query-builder/factories/args-alias.factory';
|
||||
import { duplicateCriteriaCollection } from 'src/engine/api/graphql/workspace-resolver-builder/constants/duplicate-criteria.constants';
|
||||
import { settings } from 'src/engine/constants/settings';
|
||||
|
||||
import { FieldsStringFactory } from './fields-string.factory';
|
@ -1,13 +1,13 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/api/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
import {
|
||||
RecordFilter,
|
||||
RecordOrderBy,
|
||||
} from 'src/engine/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import { FindManyResolverArgs } from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
} from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import { FindManyResolverArgs } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
|
||||
import { computeObjectTargetTable } from 'src/engine-workspace/utils/compute-object-target-table.util';
|
||||
import { computeObjectTargetTable } from 'src/engine/utils/compute-object-target-table.util';
|
||||
|
||||
import { ArgsStringFactory } from './args-string.factory';
|
||||
import { FieldsStringFactory } from './fields-string.factory';
|
@ -1,10 +1,10 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
import { RecordFilter } from 'src/engine/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import { FindOneResolverArgs } from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/api/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
import { RecordFilter } from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import { FindOneResolverArgs } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
|
||||
import { computeObjectTargetTable } from 'src/engine-workspace/utils/compute-object-target-table.util';
|
||||
import { computeObjectTargetTable } from 'src/engine/utils/compute-object-target-table.util';
|
||||
|
||||
import { ArgsStringFactory } from './args-string.factory';
|
||||
import { FieldsStringFactory } from './fields-string.factory';
|
@ -5,15 +5,15 @@ import { GraphQLResolveInfo } from 'graphql';
|
||||
import { FieldMetadataInterface } from 'src/engine-metadata/field-metadata/interfaces/field-metadata.interface';
|
||||
import { ObjectMetadataInterface } from 'src/engine-metadata/field-metadata/interfaces/object-metadata.interface';
|
||||
|
||||
import { isRelationFieldMetadataType } from 'src/engine-workspace/utils/is-relation-field-metadata-type.util';
|
||||
import { isRelationFieldMetadataType } from 'src/engine/utils/is-relation-field-metadata-type.util';
|
||||
import { RelationMetadataType } from 'src/engine-metadata/relation-metadata/relation-metadata.entity';
|
||||
import {
|
||||
deduceRelationDirection,
|
||||
RelationDirection,
|
||||
} from 'src/engine-workspace/utils/deduce-relation-direction.util';
|
||||
import { getFieldArgumentsByKey } from 'src/engine/graphql/workspace-query-builder/utils/get-field-arguments-by-key.util';
|
||||
} from 'src/engine/utils/deduce-relation-direction.util';
|
||||
import { getFieldArgumentsByKey } from 'src/engine/api/graphql/workspace-query-builder/utils/get-field-arguments-by-key.util';
|
||||
import { ObjectMetadataService } from 'src/engine-metadata/object-metadata/object-metadata.service';
|
||||
import { computeObjectTargetTable } from 'src/engine-workspace/utils/compute-object-target-table.util';
|
||||
import { computeObjectTargetTable } from 'src/engine/utils/compute-object-target-table.util';
|
||||
|
||||
import { FieldsStringFactory } from './fields-string.factory';
|
||||
import { ArgsStringFactory } from './args-string.factory';
|
@ -3,14 +3,14 @@ import { Injectable } from '@nestjs/common';
|
||||
import {
|
||||
Record as IRecord,
|
||||
RecordFilter,
|
||||
} from 'src/engine/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
import { UpdateManyResolverArgs } from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
} from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/api/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
import { UpdateManyResolverArgs } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
|
||||
import { stringifyWithoutKeyQuote } from 'src/engine/graphql/workspace-query-builder/utils/stringify-without-key-quote.util';
|
||||
import { FieldsStringFactory } from 'src/engine/graphql/workspace-query-builder/factories/fields-string.factory';
|
||||
import { ArgsAliasFactory } from 'src/engine/graphql/workspace-query-builder/factories/args-alias.factory';
|
||||
import { computeObjectTargetTable } from 'src/engine-workspace/utils/compute-object-target-table.util';
|
||||
import { stringifyWithoutKeyQuote } from 'src/engine/api/graphql/workspace-query-builder/utils/stringify-without-key-quote.util';
|
||||
import { FieldsStringFactory } from 'src/engine/api/graphql/workspace-query-builder/factories/fields-string.factory';
|
||||
import { ArgsAliasFactory } from 'src/engine/api/graphql/workspace-query-builder/factories/args-alias.factory';
|
||||
import { computeObjectTargetTable } from 'src/engine/utils/compute-object-target-table.util';
|
||||
|
||||
export interface UpdateManyQueryFactoryOptions
|
||||
extends WorkspaceQueryBuilderOptions {
|
@ -1,11 +1,11 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
import { Record as IRecord } from 'src/engine/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import { UpdateOneResolverArgs } from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/api/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
import { Record as IRecord } from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import { UpdateOneResolverArgs } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
|
||||
import { stringifyWithoutKeyQuote } from 'src/engine/graphql/workspace-query-builder/utils/stringify-without-key-quote.util';
|
||||
import { computeObjectTargetTable } from 'src/engine-workspace/utils/compute-object-target-table.util';
|
||||
import { stringifyWithoutKeyQuote } from 'src/engine/api/graphql/workspace-query-builder/utils/stringify-without-key-quote.util';
|
||||
import { computeObjectTargetTable } from 'src/engine/utils/compute-object-target-table.util';
|
||||
|
||||
import { FieldsStringFactory } from './fields-string.factory';
|
||||
import { ArgsAliasFactory } from './args-alias.factory';
|
@ -1,4 +1,4 @@
|
||||
import { stringifyWithoutKeyQuote } from 'src/engine/graphql/workspace-query-builder/utils/stringify-without-key-quote.util';
|
||||
import { stringifyWithoutKeyQuote } from 'src/engine/api/graphql/workspace-query-builder/utils/stringify-without-key-quote.util';
|
||||
|
||||
describe('stringifyWithoutKeyQuote', () => {
|
||||
test('should stringify object correctly without quotes around keys', () => {
|
@ -1,11 +1,11 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
import { WorkspaceQueryBuilderOptions } from 'src/engine/api/graphql/workspace-query-builder/interfaces/workspace-query-builder-options.interface';
|
||||
import {
|
||||
Record as IRecord,
|
||||
RecordFilter,
|
||||
RecordOrderBy,
|
||||
} from 'src/engine/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
} from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import {
|
||||
FindManyResolverArgs,
|
||||
FindOneResolverArgs,
|
||||
@ -15,7 +15,7 @@ import {
|
||||
UpdateManyResolverArgs,
|
||||
DeleteManyResolverArgs,
|
||||
FindDuplicatesResolverArgs,
|
||||
} from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
} from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
|
||||
import { FindManyQueryFactory } from './factories/find-many-query.factory';
|
||||
import { FindOneQueryFactory } from './factories/find-one-query.factory';
|
@ -1,8 +1,8 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { ObjectMetadataModule } from 'src/engine-metadata/object-metadata/object-metadata.module';
|
||||
import { FieldsStringFactory } from 'src/engine/graphql/workspace-query-builder/factories/fields-string.factory';
|
||||
import { RecordPositionQueryFactory } from 'src/engine/graphql/workspace-query-builder/factories/record-position-query.factory';
|
||||
import { FieldsStringFactory } from 'src/engine/api/graphql/workspace-query-builder/factories/fields-string.factory';
|
||||
import { RecordPositionQueryFactory } from 'src/engine/api/graphql/workspace-query-builder/factories/record-position-query.factory';
|
||||
|
||||
import { WorkspaceQueryBuilderFactory } from './workspace-query-builder.factory';
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
|
||||
import { WorkspaceQueryRunnerOptions } from 'src/engine/graphql/workspace-query-runner/interfaces/query-runner-option.interface';
|
||||
import { WorkspaceQueryRunnerOptions } from 'src/engine/api/graphql/workspace-query-runner/interfaces/query-runner-option.interface';
|
||||
import { FieldMetadataInterface } from 'src/engine-metadata/field-metadata/interfaces/field-metadata.interface';
|
||||
|
||||
import { QueryRunnerArgsFactory } from 'src/engine/graphql/workspace-query-runner/factories/query-runner-args.factory';
|
||||
import { QueryRunnerArgsFactory } from 'src/engine/api/graphql/workspace-query-runner/factories/query-runner-args.factory';
|
||||
import { FieldMetadataType } from 'src/engine-metadata/field-metadata/field-metadata.entity';
|
||||
import { RecordPositionFactory } from 'src/engine/graphql/workspace-query-runner/factories/record-position.factory';
|
||||
import { RecordPositionFactory } from 'src/engine/api/graphql/workspace-query-runner/factories/record-position.factory';
|
||||
|
||||
describe('QueryRunnerArgsFactory', () => {
|
||||
const recordPositionFactory = {
|
@ -1,8 +1,8 @@
|
||||
import { TestingModule, Test } from '@nestjs/testing';
|
||||
|
||||
import { WorkspaceDataSourceService } from 'src/engine/workspace-datasource/workspace-datasource.service';
|
||||
import { RecordPositionQueryFactory } from 'src/engine/graphql/workspace-query-builder/factories/record-position-query.factory';
|
||||
import { RecordPositionFactory } from 'src/engine/graphql/workspace-query-runner/factories/record-position.factory';
|
||||
import { RecordPositionQueryFactory } from 'src/engine/api/graphql/workspace-query-builder/factories/record-position-query.factory';
|
||||
import { RecordPositionFactory } from 'src/engine/api/graphql/workspace-query-runner/factories/record-position.factory';
|
||||
|
||||
describe('RecordPositionFactory', () => {
|
||||
const recordPositionQueryFactory = {
|
@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
import { FieldMetadataInterface } from 'src/engine-metadata/field-metadata/interfaces/field-metadata.interface';
|
||||
import { WorkspaceQueryRunnerOptions } from 'src/engine/graphql/workspace-query-runner/interfaces/query-runner-option.interface';
|
||||
import { WorkspaceQueryRunnerOptions } from 'src/engine/api/graphql/workspace-query-runner/interfaces/query-runner-option.interface';
|
||||
|
||||
import { FieldMetadataType } from 'src/engine-metadata/field-metadata/field-metadata.entity';
|
||||
|
@ -4,7 +4,7 @@ import { WorkspaceDataSourceService } from 'src/engine/workspace-datasource/work
|
||||
import {
|
||||
RecordPositionQueryFactory,
|
||||
RecordPositionQueryType,
|
||||
} from 'src/engine/graphql/workspace-query-builder/factories/record-position-query.factory';
|
||||
} from 'src/engine/api/graphql/workspace-query-builder/factories/record-position-query.factory';
|
||||
|
||||
@Injectable()
|
||||
export class RecordPositionFactory {
|
@ -1,5 +1,5 @@
|
||||
import { IEdge } from './edge.interface';
|
||||
import { IPageInfo } from './page-info.interface';
|
||||
import { IEdge } from './edge.interface';
|
||||
|
||||
export interface IConnection<T, CustomEdge extends IEdge<T> = IEdge<T>> {
|
||||
edges: Array<CustomEdge>;
|
@ -1,4 +1,4 @@
|
||||
import { Record as IRecord } from 'src/engine/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import { Record as IRecord } from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
|
||||
export interface PGGraphQLResponse<Data = any> {
|
||||
resolve: {
|
@ -1,17 +1,17 @@
|
||||
import { Inject, Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import { MessageQueueJob } from 'src/integrations/message-queue/interfaces/message-queue-job.interface';
|
||||
import { MessageQueueJob } from 'src/engine/integrations/message-queue/interfaces/message-queue-job.interface';
|
||||
import { ObjectMetadataInterface } from 'src/engine-metadata/field-metadata/interfaces/object-metadata.interface';
|
||||
|
||||
import { WorkspaceDataSourceService } from 'src/engine/workspace-datasource/workspace-datasource.service';
|
||||
import { ObjectMetadataService } from 'src/engine-metadata/object-metadata/object-metadata.service';
|
||||
import { DataSourceService } from 'src/engine-metadata/data-source/data-source.service';
|
||||
import { MessageQueueService } from 'src/integrations/message-queue/services/message-queue.service';
|
||||
import { MessageQueue } from 'src/integrations/message-queue/message-queue.constants';
|
||||
import { MessageQueueService } from 'src/engine/integrations/message-queue/services/message-queue.service';
|
||||
import { MessageQueue } from 'src/engine/integrations/message-queue/message-queue.constants';
|
||||
import {
|
||||
CallWebhookJob,
|
||||
CallWebhookJobData,
|
||||
} from 'src/engine/graphql/workspace-query-runner/jobs/call-webhook.job';
|
||||
} from 'src/engine/api/graphql/workspace-query-runner/jobs/call-webhook.job';
|
||||
|
||||
export enum CallWebhookJobsJobOperation {
|
||||
create = 'create',
|
@ -1,7 +1,7 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { HttpService } from '@nestjs/axios';
|
||||
|
||||
import { MessageQueueJob } from 'src/integrations/message-queue/interfaces/message-queue-job.interface';
|
||||
import { MessageQueueJob } from 'src/engine/integrations/message-queue/interfaces/message-queue-job.interface';
|
||||
|
||||
export type CallWebhookJobData = {
|
||||
targetUrl: string;
|
@ -1,8 +1,8 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
import { MessageQueueJob } from 'src/integrations/message-queue/interfaces/message-queue-job.interface';
|
||||
import { MessageQueueJob } from 'src/engine/integrations/message-queue/interfaces/message-queue-job.interface';
|
||||
|
||||
import { RecordPositionBackfillService } from 'src/engine/graphql/workspace-query-runner/services/record-position-backfill-service';
|
||||
import { RecordPositionBackfillService } from 'src/engine/api/graphql/workspace-query-runner/services/record-position-backfill-service';
|
||||
|
||||
export type RecordPositionBackfillJobData = {
|
||||
workspaceId: string;
|
@ -4,13 +4,13 @@ import { OnEvent } from '@nestjs/event-emitter';
|
||||
import {
|
||||
CreatedObjectMetadata,
|
||||
ObjectRecordCreateEvent,
|
||||
} from 'src/integrations/event-emitter/types/object-record-create.event';
|
||||
import { MessageQueue } from 'src/integrations/message-queue/message-queue.constants';
|
||||
import { MessageQueueService } from 'src/integrations/message-queue/services/message-queue.service';
|
||||
} from 'src/engine/integrations/event-emitter/types/object-record-create.event';
|
||||
import { MessageQueue } from 'src/engine/integrations/message-queue/message-queue.constants';
|
||||
import { MessageQueueService } from 'src/engine/integrations/message-queue/services/message-queue.service';
|
||||
import {
|
||||
RecordPositionBackfillJob,
|
||||
RecordPositionBackfillJobData,
|
||||
} from 'src/engine/graphql/workspace-query-runner/jobs/record-position-backfill.job';
|
||||
} from 'src/engine/api/graphql/workspace-query-runner/jobs/record-position-backfill.job';
|
||||
|
||||
@Injectable()
|
||||
export class RecordPositionListener {
|
@ -1,9 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/workspace-datasource.module';
|
||||
import { RecordPositionQueryFactory } from 'src/engine/graphql/workspace-query-builder/factories/record-position-query.factory';
|
||||
import { RecordPositionFactory } from 'src/engine/graphql/workspace-query-runner/factories/record-position.factory';
|
||||
import { RecordPositionBackfillService } from 'src/engine/graphql/workspace-query-runner/services/record-position-backfill-service';
|
||||
import { RecordPositionQueryFactory } from 'src/engine/api/graphql/workspace-query-builder/factories/record-position-query.factory';
|
||||
import { RecordPositionFactory } from 'src/engine/api/graphql/workspace-query-runner/factories/record-position.factory';
|
||||
import { RecordPositionBackfillService } from 'src/engine/api/graphql/workspace-query-runner/services/record-position-backfill-service';
|
||||
|
||||
@Module({
|
||||
imports: [WorkspaceDataSourceModule],
|
@ -6,8 +6,8 @@ import { WorkspaceDataSourceService } from 'src/engine/workspace-datasource/work
|
||||
import {
|
||||
RecordPositionQueryFactory,
|
||||
RecordPositionQueryType,
|
||||
} from 'src/engine/graphql/workspace-query-builder/factories/record-position-query.factory';
|
||||
import { RecordPositionFactory } from 'src/engine/graphql/workspace-query-runner/factories/record-position.factory';
|
||||
} from 'src/engine/api/graphql/workspace-query-builder/factories/record-position-query.factory';
|
||||
import { RecordPositionFactory } from 'src/engine/api/graphql/workspace-query-runner/factories/record-position.factory';
|
||||
|
||||
@Injectable()
|
||||
export class RecordPositionBackfillService {
|
@ -2,7 +2,7 @@ import {
|
||||
isSpecialKey,
|
||||
handleSpecialKey,
|
||||
parseResult,
|
||||
} from 'src/engine/graphql/workspace-query-runner/utils/parse-result.util';
|
||||
} from 'src/engine/api/graphql/workspace-query-runner/utils/parse-result.util';
|
||||
|
||||
describe('isSpecialKey', () => {
|
||||
test('should return true if the key starts with "___"', () => {
|
@ -1,4 +1,4 @@
|
||||
import { ResolverArgs } from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { ResolverArgs } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
|
||||
export interface WorkspacePreQueryHook {
|
||||
execute(
|
@ -8,7 +8,7 @@ import {
|
||||
FindOneResolverArgs,
|
||||
UpdateManyResolverArgs,
|
||||
UpdateOneResolverArgs,
|
||||
} from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
} from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
|
||||
export type ExecutePreHookMethod =
|
||||
| 'createMany'
|
@ -0,0 +1,11 @@
|
||||
import { MessageFindManyPreQueryHook } from 'src/modules/messaging/query-hooks/message/message-find-many.pre-query.hook';
|
||||
import { MessageFindOnePreQueryHook } from 'src/modules/messaging/query-hooks/message/message-find-one.pre-query-hook';
|
||||
import { WorkspaceQueryHook } from 'src/engine/api/graphql/workspace-query-runner/workspace-pre-query-hook/types/workspace-query-hook.type';
|
||||
|
||||
// TODO: move to a decorator
|
||||
export const workspacePreQueryHooks: WorkspaceQueryHook = {
|
||||
message: {
|
||||
findOne: [MessageFindOnePreQueryHook.name],
|
||||
findMany: [MessageFindManyPreQueryHook.name],
|
||||
},
|
||||
};
|
@ -0,0 +1,11 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { MessagingQueryHookModule } from 'src/modules/messaging/query-hooks/messaging-query-hook.module';
|
||||
import { WorkspacePreQueryHookService } from 'src/engine/api/graphql/workspace-query-runner/workspace-pre-query-hook/workspace-pre-query-hook.service';
|
||||
|
||||
@Module({
|
||||
imports: [MessagingQueryHookModule],
|
||||
providers: [WorkspacePreQueryHookService],
|
||||
exports: [WorkspacePreQueryHookService],
|
||||
})
|
||||
export class WorkspacePreQueryHookModule {}
|
@ -1,13 +1,13 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { ModuleRef } from '@nestjs/core';
|
||||
|
||||
import { WorkspacePreQueryHook } from 'src/engine/graphql/workspace-query-runner/workspace-pre-query-hook/interfaces/workspace-pre-query-hook.interface';
|
||||
import { WorkspacePreQueryHook } from 'src/engine/api/graphql/workspace-query-runner/workspace-pre-query-hook/interfaces/workspace-pre-query-hook.interface';
|
||||
|
||||
import {
|
||||
ExecutePreHookMethod,
|
||||
WorkspacePreQueryHookPayload,
|
||||
} from 'src/engine/graphql/workspace-query-runner/workspace-pre-query-hook/types/workspace-query-hook.type';
|
||||
import { workspacePreQueryHooks } from 'src/engine/graphql/workspace-query-runner/workspace-pre-query-hook/workspace-pre-query-hook.config';
|
||||
} from 'src/engine/api/graphql/workspace-query-runner/workspace-pre-query-hook/types/workspace-query-hook.type';
|
||||
import { workspacePreQueryHooks } from 'src/engine/api/graphql/workspace-query-runner/workspace-pre-query-hook/workspace-pre-query-hook.config';
|
||||
|
||||
@Injectable()
|
||||
export class WorkspacePreQueryHookService {
|
@ -1,10 +1,10 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { WorkspaceQueryBuilderModule } from 'src/engine/graphql/workspace-query-builder/workspace-query-builder.module';
|
||||
import { WorkspaceQueryBuilderModule } from 'src/engine/api/graphql/workspace-query-builder/workspace-query-builder.module';
|
||||
import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/workspace-datasource.module';
|
||||
import { WorkspacePreQueryHookModule } from 'src/engine/graphql/workspace-query-runner/workspace-pre-query-hook/workspace-pre-query-hook.module';
|
||||
import { workspaceQueryRunnerFactories } from 'src/engine/graphql/workspace-query-runner/factories';
|
||||
import { RecordPositionListener } from 'src/engine/graphql/workspace-query-runner/listeners/record-position.listener';
|
||||
import { WorkspacePreQueryHookModule } from 'src/engine/api/graphql/workspace-query-runner/workspace-pre-query-hook/workspace-pre-query-hook.module';
|
||||
import { workspaceQueryRunnerFactories } from 'src/engine/api/graphql/workspace-query-runner/factories';
|
||||
import { RecordPositionListener } from 'src/engine/api/graphql/workspace-query-runner/listeners/record-position.listener';
|
||||
|
||||
import { WorkspaceQueryRunnerService } from './workspace-query-runner.service';
|
||||
|
@ -8,12 +8,12 @@ import { EventEmitter2 } from '@nestjs/event-emitter';
|
||||
|
||||
import isEmpty from 'lodash.isempty';
|
||||
|
||||
import { IConnection } from 'src/utils/pagination/interfaces/connection.interface';
|
||||
import { IConnection } from 'src/engine/api/graphql/workspace-query-runner/interfaces/connection.interface';
|
||||
import {
|
||||
Record as IRecord,
|
||||
RecordFilter,
|
||||
RecordOrderBy,
|
||||
} from 'src/engine/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
} from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import {
|
||||
CreateManyResolverArgs,
|
||||
CreateOneResolverArgs,
|
||||
@ -24,27 +24,27 @@ import {
|
||||
FindOneResolverArgs,
|
||||
UpdateManyResolverArgs,
|
||||
UpdateOneResolverArgs,
|
||||
} from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
} from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { ObjectMetadataInterface } from 'src/engine-metadata/field-metadata/interfaces/object-metadata.interface';
|
||||
|
||||
import { WorkspaceQueryBuilderFactory } from 'src/engine/graphql/workspace-query-builder/workspace-query-builder.factory';
|
||||
import { WorkspaceQueryBuilderFactory } from 'src/engine/api/graphql/workspace-query-builder/workspace-query-builder.factory';
|
||||
import { WorkspaceDataSourceService } from 'src/engine/workspace-datasource/workspace-datasource.service';
|
||||
import { MessageQueueService } from 'src/integrations/message-queue/services/message-queue.service';
|
||||
import { MessageQueue } from 'src/integrations/message-queue/message-queue.constants';
|
||||
import { MessageQueueService } from 'src/engine/integrations/message-queue/services/message-queue.service';
|
||||
import { MessageQueue } from 'src/engine/integrations/message-queue/message-queue.constants';
|
||||
import {
|
||||
CallWebhookJobsJob,
|
||||
CallWebhookJobsJobData,
|
||||
CallWebhookJobsJobOperation,
|
||||
} from 'src/engine/graphql/workspace-query-runner/jobs/call-webhook-jobs.job';
|
||||
import { parseResult } from 'src/engine/graphql/workspace-query-runner/utils/parse-result.util';
|
||||
import { computeObjectTargetTable } from 'src/engine-workspace/utils/compute-object-target-table.util';
|
||||
import { ObjectRecordDeleteEvent } from 'src/integrations/event-emitter/types/object-record-delete.event';
|
||||
import { ObjectRecordCreateEvent } from 'src/integrations/event-emitter/types/object-record-create.event';
|
||||
import { ObjectRecordUpdateEvent } from 'src/integrations/event-emitter/types/object-record-update.event';
|
||||
import { WorkspacePreQueryHookService } from 'src/engine/graphql/workspace-query-runner/workspace-pre-query-hook/workspace-pre-query-hook.service';
|
||||
import { EnvironmentService } from 'src/integrations/environment/environment.service';
|
||||
} from 'src/engine/api/graphql/workspace-query-runner/jobs/call-webhook-jobs.job';
|
||||
import { parseResult } from 'src/engine/api/graphql/workspace-query-runner/utils/parse-result.util';
|
||||
import { computeObjectTargetTable } from 'src/engine/utils/compute-object-target-table.util';
|
||||
import { ObjectRecordDeleteEvent } from 'src/engine/integrations/event-emitter/types/object-record-delete.event';
|
||||
import { ObjectRecordCreateEvent } from 'src/engine/integrations/event-emitter/types/object-record-create.event';
|
||||
import { ObjectRecordUpdateEvent } from 'src/engine/integrations/event-emitter/types/object-record-update.event';
|
||||
import { WorkspacePreQueryHookService } from 'src/engine/api/graphql/workspace-query-runner/workspace-pre-query-hook/workspace-pre-query-hook.service';
|
||||
import { EnvironmentService } from 'src/engine/integrations/environment/environment.service';
|
||||
import { NotFoundError } from 'src/engine/filters/utils/graphql-errors.util';
|
||||
import { QueryRunnerArgsFactory } from 'src/engine/graphql/workspace-query-runner/factories/query-runner-args.factory';
|
||||
import { QueryRunnerArgsFactory } from 'src/engine/api/graphql/workspace-query-runner/factories/query-runner-args.factory';
|
||||
|
||||
import { WorkspaceQueryRunnerOptions } from './interfaces/query-runner-option.interface';
|
||||
import {
|
@ -1,4 +1,4 @@
|
||||
import { RecordDuplicateCriteria } from 'src/engine/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import { RecordDuplicateCriteria } from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
|
||||
/**
|
||||
* objectName: directly reference the name of the object from the metadata tables.
|
@ -3,11 +3,11 @@ import { Injectable } from '@nestjs/common';
|
||||
import {
|
||||
CreateManyResolverArgs,
|
||||
Resolver,
|
||||
} from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { WorkspaceSchemaBuilderContext } from 'src/engine/graphql/workspace-schema-builder/interfaces/workspace-schema-builder-context.interface';
|
||||
import { WorkspaceResolverBuilderFactoryInterface } from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolver-builder-factory.interface';
|
||||
} from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { WorkspaceSchemaBuilderContext } from 'src/engine/api/graphql/workspace-schema-builder/interfaces/workspace-schema-builder-context.interface';
|
||||
import { WorkspaceResolverBuilderFactoryInterface } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolver-builder-factory.interface';
|
||||
|
||||
import { WorkspaceQueryRunnerService } from 'src/engine/graphql/workspace-query-runner/workspace-query-runner.service';
|
||||
import { WorkspaceQueryRunnerService } from 'src/engine/api/graphql/workspace-query-runner/workspace-query-runner.service';
|
||||
|
||||
@Injectable()
|
||||
export class CreateManyResolverFactory
|
@ -3,11 +3,11 @@ import { Injectable } from '@nestjs/common';
|
||||
import {
|
||||
CreateOneResolverArgs,
|
||||
Resolver,
|
||||
} from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { WorkspaceSchemaBuilderContext } from 'src/engine/graphql/workspace-schema-builder/interfaces/workspace-schema-builder-context.interface';
|
||||
import { WorkspaceResolverBuilderFactoryInterface } from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolver-builder-factory.interface';
|
||||
} from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { WorkspaceSchemaBuilderContext } from 'src/engine/api/graphql/workspace-schema-builder/interfaces/workspace-schema-builder-context.interface';
|
||||
import { WorkspaceResolverBuilderFactoryInterface } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolver-builder-factory.interface';
|
||||
|
||||
import { WorkspaceQueryRunnerService } from 'src/engine/graphql/workspace-query-runner/workspace-query-runner.service';
|
||||
import { WorkspaceQueryRunnerService } from 'src/engine/api/graphql/workspace-query-runner/workspace-query-runner.service';
|
||||
|
||||
@Injectable()
|
||||
export class CreateOneResolverFactory
|
@ -3,11 +3,11 @@ import { Injectable } from '@nestjs/common';
|
||||
import {
|
||||
DeleteManyResolverArgs,
|
||||
Resolver,
|
||||
} from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { WorkspaceSchemaBuilderContext } from 'src/engine/graphql/workspace-schema-builder/interfaces/workspace-schema-builder-context.interface';
|
||||
import { WorkspaceResolverBuilderFactoryInterface } from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolver-builder-factory.interface';
|
||||
} from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { WorkspaceSchemaBuilderContext } from 'src/engine/api/graphql/workspace-schema-builder/interfaces/workspace-schema-builder-context.interface';
|
||||
import { WorkspaceResolverBuilderFactoryInterface } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolver-builder-factory.interface';
|
||||
|
||||
import { WorkspaceQueryRunnerService } from 'src/engine/graphql/workspace-query-runner/workspace-query-runner.service';
|
||||
import { WorkspaceQueryRunnerService } from 'src/engine/api/graphql/workspace-query-runner/workspace-query-runner.service';
|
||||
|
||||
@Injectable()
|
||||
export class DeleteManyResolverFactory
|
@ -3,11 +3,11 @@ import { Injectable } from '@nestjs/common';
|
||||
import {
|
||||
DeleteOneResolverArgs,
|
||||
Resolver,
|
||||
} from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { WorkspaceSchemaBuilderContext } from 'src/engine/graphql/workspace-schema-builder/interfaces/workspace-schema-builder-context.interface';
|
||||
import { WorkspaceResolverBuilderFactoryInterface } from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolver-builder-factory.interface';
|
||||
} from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { WorkspaceSchemaBuilderContext } from 'src/engine/api/graphql/workspace-schema-builder/interfaces/workspace-schema-builder-context.interface';
|
||||
import { WorkspaceResolverBuilderFactoryInterface } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolver-builder-factory.interface';
|
||||
|
||||
import { WorkspaceQueryRunnerService } from 'src/engine/graphql/workspace-query-runner/workspace-query-runner.service';
|
||||
import { WorkspaceQueryRunnerService } from 'src/engine/api/graphql/workspace-query-runner/workspace-query-runner.service';
|
||||
|
||||
@Injectable()
|
||||
export class DeleteOneResolverFactory
|
@ -5,13 +5,13 @@ import {
|
||||
FindOneResolverArgs,
|
||||
ExecuteQuickActionOnOneResolverArgs,
|
||||
DeleteOneResolverArgs,
|
||||
} from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { Record as IRecord } from 'src/engine/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import { WorkspaceSchemaBuilderContext } from 'src/engine/graphql/workspace-schema-builder/interfaces/workspace-schema-builder-context.interface';
|
||||
import { WorkspaceResolverBuilderFactoryInterface } from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolver-builder-factory.interface';
|
||||
import { WorkspaceQueryRunnerOptions } from 'src/engine/graphql/workspace-query-runner/interfaces/query-runner-option.interface';
|
||||
} from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { Record as IRecord } from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
import { WorkspaceSchemaBuilderContext } from 'src/engine/api/graphql/workspace-schema-builder/interfaces/workspace-schema-builder-context.interface';
|
||||
import { WorkspaceResolverBuilderFactoryInterface } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolver-builder-factory.interface';
|
||||
import { WorkspaceQueryRunnerOptions } from 'src/engine/api/graphql/workspace-query-runner/interfaces/query-runner-option.interface';
|
||||
|
||||
import { WorkspaceQueryRunnerService } from 'src/engine/graphql/workspace-query-runner/workspace-query-runner.service';
|
||||
import { WorkspaceQueryRunnerService } from 'src/engine/api/graphql/workspace-query-runner/workspace-query-runner.service';
|
||||
import { QuickActionsService } from 'src/engine/modules/quick-actions/quick-actions.service';
|
||||
|
||||
@Injectable()
|
@ -1,4 +1,4 @@
|
||||
import { UpdateManyResolverFactory } from 'src/engine/graphql/workspace-resolver-builder/factories/update-many-resolver.factory';
|
||||
import { UpdateManyResolverFactory } from 'src/engine/api/graphql/workspace-resolver-builder/factories/update-many-resolver.factory';
|
||||
|
||||
import { FindDuplicatesResolverFactory } from './find-duplicates-resolver.factory';
|
||||
import { FindManyResolverFactory } from './find-many-resolver.factory';
|
@ -3,11 +3,11 @@ import { Injectable } from '@nestjs/common';
|
||||
import {
|
||||
FindDuplicatesResolverArgs,
|
||||
Resolver,
|
||||
} from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { WorkspaceSchemaBuilderContext } from 'src/engine/graphql/workspace-schema-builder/interfaces/workspace-schema-builder-context.interface';
|
||||
import { WorkspaceResolverBuilderFactoryInterface } from 'src/engine/graphql/workspace-resolver-builder/interfaces/workspace-resolver-builder-factory.interface';
|
||||
} from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
import { WorkspaceSchemaBuilderContext } from 'src/engine/api/graphql/workspace-schema-builder/interfaces/workspace-schema-builder-context.interface';
|
||||
import { WorkspaceResolverBuilderFactoryInterface } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolver-builder-factory.interface';
|
||||
|
||||
import { WorkspaceQueryRunnerService } from 'src/engine/graphql/workspace-query-runner/workspace-query-runner.service';
|
||||
import { WorkspaceQueryRunnerService } from 'src/engine/api/graphql/workspace-query-runner/workspace-query-runner.service';
|
||||
|
||||
@Injectable()
|
||||
export class FindDuplicatesResolverFactory
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user