#Graphql + nestjs + code-first root query

3 messages · Page 1 of 1 (latest)

sharp gyro
#

Hello good day, I am building a monorepo with turbo repo and integrating graphql server with nestjs with code-first, but I am having the error
Schema generation error (code-first approach)
i am exporting the resolver in the module, i have created a query and a mutation i have even a query that the only thing it does is to return the string
init
any suggestions ?

import { Module } from '@nestjs/common';
import { GraphQLModule } from '@nestjs/graphql';
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
import { AuthenticationModule } from './authentication/authentication.module';

@Module({
  imports: [
    AuthenticationModule,
    GraphQLModule.forRoot<ApolloDriverConfig>({
      include: [AuthenticationModule],
      driver: ApolloDriver,
      playground: true,
      autoSchemaFile: true,
    }),
  ],
})
export class AppModule {}
sharp gyro
#

Solve: was an issue with the version, for some reason the cli set me the dependencies in an old version on nestjs and the nvm not using the LTS version

hearty sinew
#

@sharp gyro - Glad you got it resolved. Next GraphQL question you get, please put it in the #1025200803239166012 forum Thnx.