Replies: 1 comment
-
Do you find a way to execute this ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to be able to conditionally return paginated data. At the moment I have the query wrapped in an if() {} block but this results in duplicate code for the condition where there is no pagination, i.e. same code minus the .paginate().
I'd like to be able to write:
.if(paginate, (query) => {
query.paginate(page, perPage)
})
However, this doesn't work. How can I get this to work?
Beta Was this translation helpful? Give feedback.
All reactions