nicklandgrebe / active-resource.js

ActiveResource.js - API resource relational mapping in JavaScript
https://active-resource.js.org
MIT License
133 stars 20 forks source link

Include multiple relationships? #27

Closed nozpheratu closed 6 years ago

nozpheratu commented 6 years ago

Is there any way to include multiple relationships? E.g.,:

The following works for a single association:

const homes = Homes.includes('rooms').all();

But this doesn't appear to work.

const homes = Homes.includes('rooms,residents').all();

Looking at the request header, it appears that this produces an incorrect request URL along with a 400 Bad Request response message:

http://localhost:4000/api/homes/?include=rooms%2Cresidents.

nozpheratu commented 6 years ago

I'm sorry, I'm an idiot. Backend was misconfigured.