gqty
gqty copied to clipboard
Possible feature: validation of data coming from the API to prevent looping
Related to #520
Would actually be possible to validate the data coming from the API to prevent situations like #520 where gqty is not the one at fault?
We definitely don't want to validate too much (ajv as an extreme case), that defeats the benefits of TypeScript.
I suggest minimal assertions, e.g. invariant or assert, with a message containing enough information for users to start looking at server side.
invariant(data.allMfes0, "Response with alias `allMfes0` expected.");