I have defined a query in lighthouse:
extend type Query {
products(input: ListInput @spread): [Product]
@field(resolver: "App\\GraphQL\\Queries\\ProductComplex@index")
}
but the result of products
is not paginated. I can not use both @field
and @paginate
at the same time because there should be only one resolver. How can I paginate an eloquent query with custom resolver?
I've searched and found that I builder
could be used but I don't want to use query builders when I have defined the appropriate model.