Hello buddies.
Sorry if I duplicate the topic but I met some misunderstanding during I prepare my relationships in JSON:API topology of response.
I have a lot of records in relation. For an example thousands.
let’s imagine some article has 10000 comments. It means that we have to show all of them in relationships.comments.data within the array:
eg.
“comments”: {
“links”: {
“related”: “{url}/4/comments”,
“self”: “{url}/4/relationships/comments”
},
“data”: [
{
“type”: “comment”,
“id”: “10”
},
{
“type”: “comment”,
“id”: “12”
}
…
]
}
I thought a lot about this situation and only one decision I got:
- setup query string param ?include=comments&page[comments.number]=20
These are so raw examples, just to get what I mean.