Function: relationData()
relationData<
C
,I
,Record
,Related
,Data
>(instance
,key
): (action
) =>Promise
<Action
<Awaited
<C
&ConsumeSerializer
<Record
,Related
,Data
>> &object
,object
>>
Serialize the given instance's relation as the context's data.
Type parameters
• C extends object
• I extends ModelInstance
• Record
• Related
• Data
Parameters
• instance: I
• key: ModelRelationKey
<I
>
Returns
Function
Parameters
• action: Action
<C
& ConsumeSerializer
<Record
, Related
, Data
>>
Returns
Promise
<Action
<Awaited
<C
& ConsumeSerializer
<Record
, Related
, Data
>> & object
, object
>>
Source
packages/core/src/actions/context/enhancers/crud/relationData.ts:24