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

feat!: remove inheritPropertyInitializers from PartialType (for discussion) #923

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Thore1954
Copy link

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #1425
In this old issue from the graphql repo it is suggested that PartialType shouldn't inherit property initializers which makes total sense since a CreateCatDto may provide default value for some fields but a UpdateCatDto that marks all fields as optional should leave all unset fields undefined to avoid unwanted changes.
We can make this an option but it feels like it should be the default behavior since I can't think of any case where it can be useful.

What is the new behavior?

PartialType doesn't inherit property initializers.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@Thore1954 Thore1954 closed this Dec 1, 2022
@Thore1954 Thore1954 reopened this Dec 1, 2022
@Thore1954 Thore1954 marked this pull request as draft December 1, 2022 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant