Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(
@Inject((type) => BootLoader) bootLoader: BootLoader,
@Inject((type) => GracefulShutdown) gracefulShutdown: GracefulShutdown,
@Inject((type) => LoggerFactory) loggerFactory: LoggerFactory,
@Inject((type) => ORM) private readonly orm: ORM,
@Inject((type) => Config) config: Config
) {
config.registerConfig("Queue", `${__dirname}/../config`);
this.logger = loggerFactory.create(this.constructor.name);
bootLoader.addBootFunction(this.constructor.name, this.boot.bind(this));
gracefulShutdown.addShutdownFunction(this.constructor.name, this.end.bind(this));
}
constructor(
@Inject((type) => HookManager) hookManager: HookManager,
@Inject((type) => LoggerFactory) loggerFactory: LoggerFactory,
@Inject((type) => Config) config: Config,
@Inject((type) => BootLoader) bootLoader: BootLoader,
@Inject((type) => SchemaBuilder) schemaBuilder: SchemaBuilder,
@Inject((type) => Server) server: Server,
@Inject((type) => ORM) private readonly orm: ORM
) {
this.graphQlConfig = config.registerConfig("GraphQl", `${__dirname}/../config`);
this.hookManager = hookManager;
this.loggerFactory = loggerFactory;
this.server = server;
this.schemaBuilder = schemaBuilder;
this.logger = this.loggerFactory.create(this.constructor.name);
this.ENVIRONMENT = config.ENVIRONMENT;
if (operatorsSchemaExtension !== "") this.schemaBuilder.extendSchema(operatorsSchemaExtension);
bootLoader.addBootFunction(this.constructor.name, this.boot.bind(this));
}
constructor(
@Inject((type) => Config) config,
@Inject((type) => LoggerFactory) loggerFactory,
@Inject((type) => BootLoader) bootLoader,
@Inject((type) => ORM) private readonly orm: ORM
) {
this.loggerFactory = loggerFactory;
this.config = config;
this.schemaBuilderConfig = this.config.registerConfig("SchemaBuilder", `${__dirname}/../config`);
this.logger = this.loggerFactory.create(this.constructor.name);
this.ENVIRONMENT = this.config.ENVIRONMENT;
this.orm.addSubscriber(AfterLoadForComputedColumnsSubscriber);
bootLoader.addBootFunction(this.constructor.name, this.boot.bind(this));
}
constructor(
@Inject((type) => BootLoader) bootLoader: BootLoader,
@Inject((type) => GracefulShutdown) gracefulShutdown: GracefulShutdown,
@Inject((type) => LoggerFactory) loggerFactory: LoggerFactory,
@Inject((type) => Config) config: Config,
@Inject((type) => EventEmitter) private readonly eventEmitter: EventEmitter,
@Inject("ENVIRONMENT") environment: IEnvironment
) {
this.logger = loggerFactory.create(this.constructor.name);
this.config = config.registerConfig("Db", `${__dirname}/../../config`).orm;
this.environment = environment;
this.applicationNamePrefix = `${environment.namespace}_orm_`;
this.applicationName = `${this.applicationNamePrefix}${environment.nodeId}`;
this.clientManager = getClientManager(environment.nodeId, this.adjustORMPoolSize.bind(this));
this.addMigrations(Object.values(dbMigrationsObject));
bootLoader.addBootFunction(this.constructor.name, this.boot.bind(this));
gracefulShutdown.addShutdownFunction(this.constructor.name, this.end.bind(this));
}
link: new apollo_link_schema_1.SchemaLink({
schema: this.apolloSchema,
context: {
ctx: {},
accessToken: null
}
})
});
}
};
GraphQl = __decorate([
di_1.Service(),
__param(0, di_1.Inject((type) => logger_1.LoggerFactory)),
__param(1, di_1.Inject((type) => config_1.Config)),
__param(2, di_1.Inject((type) => boot_loader_1.BootLoader)),
__param(3, di_1.Inject((type) => schema_builder_1.SchemaBuilder)),
__param(4, di_1.Inject((type) => server_1.Server)),
__param(5, di_1.Inject((type) => db_1.DbGeneralPool)),
__metadata("design:paramtypes", [Object, Object, Object, Object, Object, Object])
], GraphQl);
exports.GraphQl = GraphQl;
constructor(
@Inject((type) => BootLoader) bootLoader: BootLoader,
@Inject((type) => GracefulShutdown) gracefulShutdown: GracefulShutdown,
@Inject((type) => LoggerFactory) loggerFactory: LoggerFactory,
@Inject((type) => Config) config: Config,
@Inject((type) => EventEmitter) private readonly eventEmitter: EventEmitter,
@Inject("ENVIRONMENT") environment: IEnvironment
) {
this.logger = loggerFactory.create(this.constructor.name);
this.config = config.registerConfig("Db", `${__dirname}/../config`);
this.environment = environment;
this.applicationNamePrefix = `${environment.namespace}_orm_`;
this.applicationName = `${this.applicationNamePrefix}${environment.nodeId}`;
this.clientManager = getClientManager(environment.nodeId, this.adjustORMPoolSize.bind(this));
this.addMigrations(Object.values(dbMigrationsObject));
bootLoader.addBootFunction(this.constructor.name, this.boot.bind(this));
gracefulShutdown.addShutdownFunction(this.constructor.name, this.end.bind(this));
}
constructor(
@Inject((type) => Auth) private readonly auth: Auth,
@Inject((type) => GraphQl) private readonly graphQl: GraphQl,
@Inject((type) => SchemaBuilder) private readonly schemaBuilder: SchemaBuilder,
@Inject((type) => BootLoader) bootLoader: BootLoader,
@Inject((type) => Config) config: Config,
@Inject((type) => LoggerFactory) loggerFactory: LoggerFactory,
@Inject((type) => ORM) private readonly orm: ORM
) {
this.fileStorageConfig = config.registerConfig("FileStorage", `${__dirname}/../config`);
this.logger = loggerFactory.create(this.constructor.name);
this.orm.addMigrations(migrations);
this.schemaBuilder.extendSchema(schema);
this.schemaBuilder.addExtension(getParser());
this.graphQl.addResolvers(this.getResolvers());