Ok, thanks. But I already have included my comments in GET response for category, like this:
{
"data": {
"id": "1",
"type": "categories",
"attributes": {
"name": "Book"
},
"relationships": {
"posts": {
"data": [{
"id": "11",
"type": "posts"
}, {
"id": "14",
"type": "posts"
}, {
"id": "16",
"type": "posts"
}]
}
}
},
"included": [{
"id": "11",
"type": "posts",
"attributes": {
"style": false,
"comments": true
}
}, {
"id": "14",
"type": "posts",
"attributes": {
"style": true,
"comments": false
}
}, {
"id": "16",
"type": "posts",
"attributes": {
"style": true,
"comments": false
}
}]
}
I think all this is not working the way I want maybe because of this (javascript - Ember 2, Strange behaviour with isPending, isSettled, isFulfilled when using included relationships in API response - Stack Overflow).
SHORTLY:
I don’t want many many many HTTP requests. Just one for category (model) and one (non blocking, with loading message) for posts (after the first one for model: category)…