Is it possible to call a wire adapter such as getObjectInfo
imperatively? I know they return void
and not a Promise
so surely they can't be called like an Apex method. This is the error I've been getting:
LWC component's @wire target property or method threw an error during value provisioning. Original error: [this.callback is not a function]]
Example call I've tried:
method() {
getObjectInfo({ objectApiName: 'Account' });
}
If this is not possible is there any way I could utilize the LDS adapters imperatively as opposed to resorting to Apex? In my case I want to retrieve a list of fields for an object, on demand.