Is there any way to customize the output of list response? Like I already have a mechanism to paginate which takes only offset
passed from the client, which then decoded, validated and used in list query.
So right now what I achieve is
{
"data": {
"items": [
{
"id": "2"
}
]
}
}
- Is it possible to modify response to
{
"data": {
"items": [
{
"id": "2"
}
]
},
"pagination": { # Or even add custom headers like Github does with X-PAGE-NEXT, etc.
"next" : "xyz",
"prev": null
}
}
Or shall I create a “type” for my “paged list”. Then how can I achieve it with absinthe. Creating blah_page
for each list occasion is a boilerplate code for sure.
2. Does it affect client somehow? Currently didn’t dig into this. So may be somebody already faced with this questions.