Category "nestjs"

nestjs / graphql : default exception filter discloses too much sensitive data

The docs at https://docs.nestjs.com/graphql/other-features#exception-filters only says : Nest standard exception filters are compatible with GraphQL applicatio

How to manage the Strategy user info in NestJS and pass it to the client side in Angular?

I'm doing a little project in this quarantine time to learn about the backend part of a project. In this case I'm using Angular as client-side and NestJS as bac

TypeORM CLI: No changes in database schema were found

I'm am developing an application using NestJS and TypeORM. Whenever I try to generate migrations from my entities (by running typeorm migration:generate) I get

Nestjs: Unable to connect mongo asynchronously

I am unable to connect to mongodb asynchronously. Please let me know what am I doing wrong. MongoConfig file: import { MongooseModuleOptions } from '@nestjs/mon

how to hot reload federation gateway in NestJS

Problem In a federated nest app, a gateway collects all the schemas from other services and form a complete graph. The question is, how to re-run the schema col

Unable to inject winston's logger instance with NestJS

I'm using NestJS 7.0.7 and Winston 3.2.1 (with nest-winston 1.3.3). I'm trying to integrate Winston into NestJS, but so far, I'm unable to inject a logger inst

NestJS cookie-parser is not a function error during e2e test

I have tried to add cookie-parser - https://www.npmjs.com/package/cookie-parser to my NestJS app: import * as cookieParser from 'cookie-parser'; consumer .appl

How to get handler route in NestJS Interceptor (For both Express and Fastify)

I am having issues trying to get a hold of the NestJS handler's route in an interceptor I am writing. For instance, if a Controller had a route as such: @Get

NestJS copy assets files

I'm working on an EmailModule that reads a pug template. I couldn't get the build to include the *.pug templates file: I have followed the instruction based o

TypeORM OneToMany causes "ReferenceError: Cannot access '<Entity>' before initialization"

I have two entities: User and Habit. A user can create multiple Habits, thus I use a OneToMany relation on the User (and ManyToOne on the Habit, respectively).

Define rules for the access control using CASL

I read the article from link and understand there are 3 ways to define abilities. But I have no clue to combine them together. For example, In the three struct

How to implement clinic.js in Nest JS Framework (typescript)

I implemented Clinic.js in Node JS. But I don't know how to implement clinic.js in Nest JS Framework. I explore it how to implement clinic.js to Nest JS. But I

NestJS enable cors in production

I've enabled CORS in my NestJS app following the official tutorial, so my main.ts looks like the following: import { FastifyAdapter, NestFactory } from '@nestj

How to add summary and body manually in swagger nestjs

I am trying to add summary in my swagger documentation routes but I am not able to find the appropriate decorator for defining the summary. There are some rout

Why kafka write null data to the database?

I am working on a nestjs project. My project gets data from Kafka's topic and writes the data to the database (mysql). If I read hundreds of messages from Kafka

How to inject service to validator constraint interface in nestjs using class-validator?

I'm trying to inject my users service into my validator constraint interface but it doesn't seem to work: import { ValidatorConstraintInterface, ValidatorConst

NestJS tcp microservice load balance

I have a nestjs app as follows: Gateway - HTTP Microservice1 - TCP (ms1) Microservice2 - TCP (ms2) Gateway calling ms1 and ms2. ms1 and ms2 are the same duplica

NestJS GRPC metadata no longer received by server after @grpc/grpc-js update

The package grpc is being depreciated so i have moved to @grpc/grpc-js as advised by the maintainers. Since moving to the new package NestJs no longer receives

How to resolve a circular dependency in nest js?

I have my app.module that imports UserModule and AuthModule. @Module({ imports: [UserModule, AuthModule], controllers: [AppController], providers: [AppSer

How to save a nested object using typeorm and Nestjs?

I have the following Data entity: @PrimaryGeneratedColumn() id: number @Column() dataA: string @Column() dataB: string @Column() dataC: number @Colum