nestjs-query icon indicating copy to clipboard operation
nestjs-query copied to clipboard

Aggregate graphQL types are generated even though `enableAggregate` is false or undefined

Open GP4cK opened this issue 2 years ago • 2 comments

Describe the bug Aggregate graphQL types are generated in the schema, even though enableAggregate is false or undefined. This bloats the schema and becomes problematic when using code generator for the frontend.

Have you read the Contributing Guidelines?

Yes

To Reproduce Steps to reproduce the behavior:

  1. Launch the examples/basic by following the indications in examples/README.md
  2. Go to http://localhost:3000/graphql and look at the schema

Expected behavior TagAggregateGroupBy, TagCountAggregate etc. should not be defined as we did not enable aggregates

Additional context I tried looking at the source code to see where the generation takes place but couldn't find it. If you gave me some indications, I'd be happy to help resolve this.

GP4cK avatar Aug 24 '21 13:08 GP4cK

Same issue. It bulks up the schema without the need for it.

ilesar avatar Sep 23 '21 19:09 ilesar

Same, it generates types that are not needed and not used.

aleksey-tk avatar Dec 13 '21 18:12 aleksey-tk