Skip to content

how to have multiple graphql module with different path #14759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ikaaasra opened this issue Mar 5, 2025 · 1 comment
Closed

how to have multiple graphql module with different path #14759

ikaaasra opened this issue Mar 5, 2025 · 1 comment
Labels
needs triage This issue has not been looked into

Comments

@ikaaasra
Copy link

ikaaasra commented Mar 5, 2025

how to have multiple graphql module with different path with code first approach ... I think when autoSchemaFile is true they search all of project files and produce the schema graphql and when we have another graphql module we get error because it want to generate again the schema ... I use include but it is not work fine for autoSchemaFile instead include it use all of modules .. and it is wrong

import { Module } from '@nestjs/common';
import { GraphQLModule } from '@nestjs/graphql';
import { UserResolver } from './user.resolver';

@Module({
  imports: [
    GraphQLModule.forRoot({
      autoSchemaFile: 'schema-user.gql',
      include: [UserModule], // Only include this module for schema generation 
                    // but it is not work and generate all of modules entire project
    }),
  ],
  providers: [UserResolver],
})
export class UserModule {}

why ??? how can I fix it ??? thanks

@ikaaasra ikaaasra added the needs triage This issue has not been looked into label Mar 5, 2025
@kamilmysliwiec
Copy link
Member

We're tracking this here nestjs/graphql#1999

@nestjs nestjs locked and limited conversation to collaborators Mar 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs triage This issue has not been looked into
Projects
None yet
Development

No branches or pull requests

2 participants