When i try to open the playground, I see this exception. Cors was enabled
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.enableCors();
await app.listen(3000);
}
bootstrap();
GraphQl config
export = <GqlModuleOptions>{
driver: ApolloDriver,
context: ({ req, connection }) => {
if (connection) {
return { req: { headers: connection.context } };
}
return { req };
},
autoSchemaFile: true,
installSubscriptionHandlers: true,
playground: true,
introspection: true,
plugins: [logPlugin],
};