text: "use strict";
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
      else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
      return c > 3 && r && Object.defineProperty(target, key, r), r;
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  const common_1 = require("@nestjs/common");
  const graphql_1 = require("@nestjs/graphql");
  const typeorm_1 = require("@nestjs/typeorm");
  const path_1 = require("path");
  const app_controller_1 = require("./app.controller");
  const app_service_1 = require("./app.service");
  const cats_module_1 = require("./entitys/cats/cats.module");
  let AppModule = class AppModule {
  };
  AppModule = __decorate([
      common_1.Module({
          imports: [
              typeorm_1.TypeOrmModule.forRoot({
                  type: process.env.DB_TYPE,
                  host: process.env.DB_HOST,
                  port: process.env.DB_PORT,
                  username: process.env.DB_USERNAME,
                  password: process.env.DB_PASSWORD,
                  database: process.env.DB_DATABASE,
                  extra: {
                      socketPath: process.env.DB_HOST,
                  },
                  entities: [__dirname + '/modules/**/*.entity{.ts,.js}'],
                  synchronize: false,
              }),
              graphql_1.GraphQLModule.forRoot({
                  context: ({ req }) => ({ req }),
                  debug: process.env.DEBUG,
                  playground: process.env.PLAYGROUND,
                  typePaths: [
                      './**/*.types.graphql',
                  ],
                  definitions: {
                      path: path_1.join(process.cwd(), 'src/graphql.ts'),
                      outputAs: 'class',
                  },
                  resolverValidationOptions: {
                      requireResolversForResolveType: false,
                  },
              }),
              cats_module_1.CatsModule,
          ],
          controllers: [app_controller_1.AppController],
          providers: [app_service_1.AppService],
      })
  ], AppModule);
  exports.AppModule = AppModule;
  //# sourceMappingURL=app.module.js.map