Sorry if I’m missing something obvious, but I’m having a bit of trouble sending refs back and forth between my backend and frontend. When I paginate I get back something like this:
"after": [
1.5,
{
"@ref": {
"id": "287890180395762177",
"collection": {
"@ref": {
"id": "foo",
"collection": { "@ref": { "id": "collections" } }
}
}
}
},
... etc
]
When I try to pass this as the after
key to paginate I get "Ref expected, Object provided."
.
Do I have to manually turn it into refs, somewhat like:
after: after.map((el) => q.Ref(q.Collection('foo'), el['@ref'].id))
Or is there an intended solution for this?