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

What is the rational for making every field optional #135

Open
aharin opened this issue Nov 22, 2022 · 3 comments
Open

What is the rational for making every field optional #135

aharin opened this issue Nov 22, 2022 · 3 comments

Comments

@aharin
Copy link

aharin commented Nov 22, 2022

Since release 3.0.0 all fields on Payment became optional. What is the rational for this? How are these types should now be used? Should we be using not-null assertion?

According to the api reference fields like amount cannot be undefined. Also it is very strange now that some fields can be both undefined and null.

wpf500 added a commit to beabee-communityrm/beabee that referenced this issue Jan 5, 2023
For some mad reason they've made everything optional, even fields that
aren't.
gocardless/gocardless-nodejs#135
@Nimisoere
Copy link

Hi @aharin! Our types are generated from our schema, which marks certain fields as required.

Before v3.0, all fields were wrongfully marked as required and 3.0 switched to defaulting to optional and only marking fields required only if specified by the schema.

We'll have a look to see why some fields are not explicitly required while in practice they are.

@matshadow
Copy link

Hey @Nimisoere , thanks for looking into this. Has there been progress on this by any chance?

@sambegin
Copy link

I asked the same question a while back: #123

Really sad to see there wasn't any progress on this

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

No branches or pull requests

4 participants