lundi 18 janvier 2016

How to sideload {json:api} records with Ember Data 2 and JSONAPI::Resources in Rails?

I'm developing an Ember app with a Rails backend, using the excellent JSONAPI::Resources gem to expose my data.

I'd like to fetch records from my the backend using store.findRecord, store.query, etc. while sideloading certain relationships. JSONAPI::Resources supports this part of the spec but I can't figure out how to make Ember Data include the ?include=... parameter in the request URL.

How can I instruct Ember Data (2.2.0) to ask the backend to include relationships when fetching resources?




Aucun commentaire:

Enregistrer un commentaire