DEV Community

Discussion on: Building NestJS app boilerplate - Authentication, Validation, GraphQL and Prisma

Collapse
 
nikitakot profile image
Nikita Kot

P.S. If you are not using graphql playground and calling the server from a front-end application served from another server (different domain/port/etc.) you need to enable cors on the nestjs server (not described in the article). To do it simply add these lines to your main.ts file to the bootstrap function.

app.enableCors({
    credentials: true,
    origin: true,
  });
Collapse
 
valerebron profile image
Valère BRON

Cors was the problem yes, thanks again for these speed responses !