What is the rational for making every field optional
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.
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.
Hey @Nimisoere , thanks for looking into this. Has there been progress on this by any chance?
I asked the same question a while back: https://github.com/gocardless/gocardless-nodejs/issues/123
Really sad to see there wasn't any progress on this