I have a microservice:
import { NestFactory } from '@nestjs/core';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.createMicroservice<MicroserviceOptions>(
AppModule,
{
transport: Transport.KAFKA,
options: {
client: {
brokers: ['localhost:9092'],
},
consumer: {
groupId: 'auth-consumer',
},
},
},
);
app.listen();
}
bootstrap();
I would like to use GQL Playground but the documentation only refers to default factory (NestFactory.create()
instead of NestFactory.createMicroservice()
). They do app.listen(XXXX)
and just have to navigate to localhost:XXXX/graphql
.
My microservice works with Kafka and is not part of my API gateway, how can I test my GQL endpoints on the GQL Playground ?
maybe this will help you!