Hi fellow AutoQuery users -
AutoQuery has a helpful MaxLimit feature; however, there are a few occaisions where I would like to bypass the limit and "return all" (considering all other filters/params). The obvious answer would be to remove MaxLimit; however, for the 99% of the cases the limit is fine. There is a super handy Query Filter option, but that's more opt-in ... would require creating filters for almost all requests. I'm hoping for more of an opt-out filter.
One way would be to remove MaxLimit setting (or make it very high) and then use a
GlobalRequestFilter to inject a new "default max", but I was hoping for something contained within AQ.
If you want to be able to query all AutoQuery Services without a limit, it sounds like you want to register the AutoQueryFeature without a MaxLimit defined and then to just pass the limit in on each request.
That's what I thought you might say. I tried removing the limit and a
RequestFilter to check if reqDTO is
IQueryDb and if so, and take is null, then set the default there. Worked like a charm.
I combined it with an existing RequestFilter for AQ based requests that forces jsconfig EDV=true if user asked for "fields", to avoid many unwanted fields in the response json. So it works out.