Skip to content
Advertisement

Tag: nestjs

Nest JS Table is not creating. Written entities

Team, I have followed Nest.js and TypeORM documentations. Somehow tables are not generating in PostgreSQL. The database is connected successfully. Nest Server running without error. Issue: The table is not generating. src/tag/tag.entity.ts src/app.module.ts .local.env Please help me generate Postgres tables. Framework – Nest JS Database – PostgreSQL Answer Your username is mediumclone but the database you’re connecting to is postgres,

Bcrypt.compare always returns true

I am using NestJS and Passport to create a simple log in/registration form and I am using bcrypt to see if the password that has been hashed is matching the password that user provides in the login form, but it always returns true In the code above, even if I set the argument as a string it will return true

NestJs ParseEnumPipe can’t be resolve

I am using the NestJs framework (love it by the way) and I want to check the incoming data so it conforms with an Enum in Typscript. So I have the following: The weird thing is that when I run this code, the first pipe gets compiled What I am doing wrong? Answer You should use @Body(‘action’, new ParseEnumPipe(ProductAction)) action:

GraphQL – “Field “updateOwner” of type “Owner!” must have a selection of subfields. Did you mean “updateOwner { … }”?”

I’m trying to get Mutation Update query in GraphQL Playground. I’m basic level in GraphQL and in learning phase. I don’t know how to create udpate Mutation for the below Owner code. Any idea what I’m missing in my code / query? —Resolver— —Service— —dto— —entity— —schema— —GraphQL Query (I don’t know whether it is correct or wrong) —error— Answer

Filter array object by type and compare key

I have two arrays, in one (aux) I get key and value. In the second array of objects (result) I have the attribute “correlati” and what I’m looking for is that if the key of the array “aux” is equal to the attribute “correlati” then it pushes that result in a new array that looks like the following : code:

How to create dto of an complex object in NestJs

I’m a beginner at NestJs and I want to create a dto of the following struct: I want to create an API that can return this object using DTOs. I tried the following dto but I got an error in the service provider : I create 3 classes OneSessionResponseDto, SessionsResponseDto, and WeekResponseDto so I can use them as a dto

Vulnerability in NestJS 8.4.5

Recently, when I run npm audit in my npm package, I receive the following error: The problem seems to be in the dicer package which is a very popular package used by NestJS. I searched the web for possible solutions but can’t find any fixes. Has anyone been able to fix this yet? Thanks in advance. Answer It seems that

In the next major version, Nest will not allow classes annotated with @Injectable(), @Catch(), and @Controller() decorators

I’m writing in Nest.js framework for 3 years and i got the message in by backend-application: I researched nest.js github and stuck what is the problem and why it says about some deprecation of useable decorators. Does anyone know how to solve this problem or what will be in the next major version of Nest.js framework Thanks in advance! Answer

Advertisement