-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JSON:API] Sync records and included relationships with memory source. #939
Comments
I'd recommend also adding an event logging strategy to your coordinator to help debug this. Check the |
Hi, thank you for your reply. You suggestion helped me solve the error, which was caused by a typo in the schema; Now the data is loaded with all relationships from the include options parameters in the JSON:API request. Now my question remains why is the data not included in the relationships of the result returned from the OrbitJS memory source, even when I include it in the query; My query looks like this:
Attributes from Thanks for your reply, |
You either need to load them separately or use |
@easybi-rm if you are working with orbit directly, @bradjones1's response is the correct solution for now. Other model-based approaches exist like ember-orbit and the in-development orbit-model. Both libraries provide a model abstraction to easily traverse data in a cache using models, allowing access to both attributes and related models. I'd like to bring an official framework-agnostic model-based solution (perhaps orbit-model itself) into orbit core eventually. |
Hello everyone,
I use JSON:API to fetch a resource and include relationships in the result. The source is synced with the coordinator to the memory source. It works for the original resource, but the included resources are not saved to the memory source. The response from the request is correct. This is my code, which I use:
Is there something that I did wrong or misunderstood?
Thanks for your help,
Rok
The text was updated successfully, but these errors were encountered: