Optional Class Properties Not Reflected in GraphQL Schema When Using SWC Builder #14351
Closed
3 tasks done
Labels
needs triage
This issue has not been looked into
Is there an existing issue for this?
Current behavior
When generating a schema from a model using
@ObjectType
, if swc is specified as the builder in nestjs-cli.json, the id property does not become nullable in the schema.However, with no builder specified, the id property becomes nullable with the above definition.
Minimum reproduction code
https://github.com/maronnjapan/test-nestjs-graphql-in-swc
Steps to reproduce
Expected behavior
When switching to the swc builder, we expect the generated schema to remain the same as the default one.
Even if it changes, we would like to understand why the behavior differs when switching to the swc builder.
Package
Other package
@nestjs/graphql
NestJS version
10.4.15
Packages versions
Node.js version
20.11.1
In which operating systems have you tested?
Other
The nest-cli.json in the sample project is as follows:
The text was updated successfully, but these errors were encountered: