Skip to content
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

Allow sortSchema via GraphQLDefinitionsFactory #3256

Closed
1 task done
olivierlacan opened this issue Jul 9, 2024 · 1 comment
Closed
1 task done

Allow sortSchema via GraphQLDefinitionsFactory #3256

olivierlacan opened this issue Jul 9, 2024 · 1 comment
Labels

Comments

@olivierlacan
Copy link

olivierlacan commented Jul 9, 2024

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

Currently the only way to enable sortSchema: true is via the GraphQLModule's GqlModuleOption but the sortSchema option isn't available in its GenerateOptions type.

When using a schema first approach, this means the only way to generate a sorted schema is to run the NestJS app that instantiates the GraphQLModule. This is a bummer because the example script shown in the schema first documentation only uses the GraphQLDefinitionsFactory.

Describe the solution you'd like

GraphQLDefinitionsFactory should allow the same sortSchema option in its GenerateOptions.

Teachability, documentation, adoption, migration strategy

No response

What is the motivation / use case for changing the behavior?

It should be possible to generate the same GraphQL schema via GraphQLModule and GraphQLDefinitionsFactory.

@kamilmysliwiec
Copy link
Member

Would you like to create a PR for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants