You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 16, 2018. It is now read-only.
See https://www.drupal.org/node/2282603. HAL+JSON has the notion of _embedded resources. But it embeds just links, not the actual resources. Which means the client must still go and fetch those.
That's annoying. So Waterwheel should do that automatically.
And in doing so, Waterwheel should do client-side caching (much like React's Relay does client-side caching), to avoid re-requesting unchanged resources.
As for the precise implementation: TBD. Perhaps a .getReference([reference_field_name])-style API makes sense? (So you can do entity.getReference('user') to get the author.)
The text was updated successfully, but these errors were encountered:
@wimleers I was wondering what your thoughts are on embedded images - when making the request, the authorization token is added thus triggering a preflight request where origin is different - I don't know about you guys but that kind of came as a bit of a surprise to me as the assets in my nginx config are static and I'm not expecting a preflight. Perhaps it's my own peculiar setup?
I'm going to close this for now. I'm not sure how much effort should be put into waterwheel actually caching responses itself, perhaps your own middleware could handle those needs. If we want to reopen this, with some more context, perhaps around jsonapi that would be great.
See https://www.drupal.org/node/2282603. HAL+JSON has the notion of
_embedded
resources. But it embeds just links, not the actual resources. Which means the client must still go and fetch those.That's annoying. So Waterwheel should do that automatically.
And in doing so, Waterwheel should do client-side caching (much like React's Relay does client-side caching), to avoid re-requesting unchanged resources.
As for the precise implementation: TBD. Perhaps a
.getReference([reference_field_name])
-style API makes sense? (So you can doentity.getReference('user')
to get the author.)The text was updated successfully, but these errors were encountered: