Category "nestjs"

NestJs/Graphql: "CustomObject" defined in resolvers, but not in schema

I'm having an issue after updating nest/core/common/graphql, in which a single type definition is not showing up in the schema. I'm consistently getting an erro

SetMetadata changes guard execution order nestjs

when i include @Permissions('read') my acessGuard stops receiving JWT info, @Permissions simply sets metadata (code below) export const Permissions = (...permis

UnhandledPromiseRejectionWarning: Error: You must `await server.start()` before calling `server.applyMiddleware()` at ApolloServer

I am trying to start my nestJs server and It keeps giving me this error: UnhandledPromiseRejectionWarning: Error: You must await server.start() before calling s

missing credentials in NestJs Passport

I've built an NestJS API with authentification. I'm using NestJS passport and I create a JSON web token when a user logs in. I've done numerous searches and I r

NestJS: Is it possible to call a third party API inside a guard?

I have create a guard to verify Okta tokens in my guard.However to verify there is another external api that needs to be called.Is it possible and advisable to

What data is needed to connect Elasticsearch module to Nestjs?

I have a problem that when running a project on nestjs and elastic an error is displayed nestjs_api_dev | ConfigurationError: Missing node(s) option nestjs_api

TypeORM SUM Operator on Relation's field

I am a student trying to develop a music library just to try out new technologies. Currently I use NestJS together with TypeORM as my backend technologies (as w

How to use moment in nestjs application

I want to use momentjs in a nestjs app, and also be able to test my services. So I provided momentjs as below in my module providers: [ { provide: '

Nest.js is giving cors error even when cors is enabled

I am developing a next.js application with nest.js as the backend. Now, I am having cors error even when I have cors enabled in my main.ts file of nest.js. Here

how to handle errors in exception filters with Fastify NestJs?

Im using the following code to catch error in fastify, however my error is that "response.send" is not a function: What's the right way to send the error on my

TypeORM Entity in NESTJS - Cannot use import statement outside a module

Started new project with 'nest new' command. Works fine until I add entity file to it. Got following error: import { Entity, Column, PrimaryGeneratedColumn

Optimise multiple api requests with Promise.all()

I'm trying to optimise multiple made to an 3rd party API (Spotify) in my NestJS API. My code is working but I do not find a way to optimise it. @Get('') async

NestJS app build with docker can't access postgres database in the same docker network: ECONNREFUSED 127.0.0.1:5432

I want to run my app on my local machine within Docker. I don't want to optimize the size of my docker app or build it for production now. Docker builds my back

nx dep-graph not showing any relations

I have this Angular/NestJS monorepo powered by NX, and I decided to make better use of NX by organising more stuff into libs, but before I do so, I want to make

How to transfer a filter to a query (TypeORM)

I want to get rid of the filter and put it in the request body. I tried using where, how can I do it? Questionnaire entity like: @OneToMany(() => LikeEntity,

How to save line breaks in database

I'm using typeorm to management my databse with nestjs framework on server and vuejs on client side, in settings i must provide a large text and i must to save

Is there a way to hide all the end-point in the controller.ts using a single decorator?

Currently, I am using @ApiExcludeEndpoint() ### on top of all methods to hide the end-point in the swagger-ui, like this: import { Controller, Get, Query,

NestJS and Mongoose find by reference object Id

I have a Mongo collection of Users and a collection of Addresses. Each address is owned by one user.Here are my schema classes: export type UserDocument = User

How to fix: No changes in database schema were found - cannot generate a migration?

I searched a lot and there are several questions like this however most of them do not have any answer or are not relevant to me. I'm using TypeORM(v0.2.45) wit

@IsPhoneNumber() npm class validator how to add multiple countries code

In Nest js dto I want to validate user mobile number with multiple countries Regex. How can I do this? @IsPhoneNumber('IN', { message: (args: ValidationArg