-
Notifications
You must be signed in to change notification settings - Fork 396
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
fix: enable non-nullable, defaulted fields in code-first schema #2500
fix: enable non-nullable, defaulted fields in code-first schema #2500
Conversation
afe1153
to
e82062c
Compare
lgtm |
This "fix" doesn't make sense to me. Now Apollo Kotlin doesn't allow to omit params with default values. Before this fix I could write |
…n't cause issues practically Related to nestjs/graphql#2500
GQL schema breaking changes expected but shouldn't cause issues practically Related to nestjs/graphql#2500
I was using "@nestjs/graphql": "^10.1.3 ", but the online version updates automatically to 10.2.0 I have a large number of similar inputtypes For example: This change is a destructive change. I would like to know why it was modified. Is the same with version 11? |
How can this be in a patch release? it completely breaks the old behaviour of defaultValue! Now per default all are mandatory, whereas they have been optional! -> this should be mentioned as a breaking change and should have been released in v11! |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
When a not-nullable field has a defaultValue it generates a nullable input field:
it generates:
What is the new behavior?
The above will generate this schema:
Does this PR introduce a breaking change?
Other information
Some of the tests (e.g. the snapshots) capture the erroneous functionality, so to keep this PR specific to the change, some existing fields had
nullable: true
set to match the existing tests.