Open
Description
Is your feature request related to a problem? Please describe.
When integrating the exposed GraphQL API in typed languages (e.g. TypeScript), you have to write boilerplate code to check for nullability of the data
field inside ListX
queries. Inherently though, I believe the returned values can never be null.
It also cause for the following ugly-looking typings in for example TS:
Describe the solution you'd like.
Ideally, Webiny can return a non-nullable data
field for the returned array + non-nullable actual type values inside the array. In the example above, that would be [Product!]!
instead of [Product]
.
Describe alternatives you've considered.
I've thought about wrapping the schema and adjusting the typings, but that requires a gateway in front of Webiny.