Open alanwguo opened 7 years ago
If the API response returns relationship with data without sideloading the related resource, is there a way to access that data with Spine?
With the following response:
{ data: { type: "foo", id: "asd", relationships: { bar: { data: { type: "bars", id: "barId" } } } }
Is there a way for to access barId from my foo resource object? I see there is a relationships array within Resource but that is not publicly accessible and its not really an ideal API to search an array to get the correct relationship data.
barId
Resource
@alingrad I think this is similar question to what I had: https://github.com/wvteijlingen/Spine/issues/127
If the API response returns relationship with data without sideloading the related resource, is there a way to access that data with Spine?
With the following response:
Is there a way for to access
barId
from my foo resource object? I see there is a relationships array withinResource
but that is not publicly accessible and its not really an ideal API to search an array to get the correct relationship data.