The RecordQueryResultOpts object supports a property named fields which is an array of fields that should be retrieved. If any of the array’s elements are falsey values, they are silently ignored. While this behavior is explicitly documented, I’m not sure it’s desirable.
Code like this is prone to error because the value of the fields elements is abstracted away. Because the API silently tolerates mistakes (e.g. a typo like consumerFields.ragion), the effect isn’t perceptable until some subsequent area of the application logic.
It’s not clear when block authors would benefit from the ability to specify values like undefined, so it may be better for the API to produce a synchronous error for such input.