Changelog - 2026-10-18
HttpRepository takes an extra query, a default limit and searches
EnhancementIn one line. An HttpRepository read can carry query parameters beside filter and where, a defaultLimit setting keeps a list from being unbounded, and search() calls the search route an IGNIS server generates.
What changed
queryon the read methods.find,findOne,findById,countandexistsWithtakequery: { merchantId: 'm1', q: 'abc' }and send it next to the filter. The filter andwherewin over a key of the same name.buildQueryhook. Every read builds its query string in one protected method,buildQuery({ method, query, params }). A subclass overrides it to reshape one verb - a keyword into the object its server reads - and leaves the others alone.defaultLimitsetting.new HttpRepository({ dataSource, resource, defaultLimit: 50 })makesfindask for 50 rows when its filter names nolimit. A filter's own limit wins.findOne,countandexistsWithkeep their own limit of 1. A value that is not a positive integer throws at construction.search({ input, query?, options? }). It POSTsinputto<resource>/search, the routeSearchControllerFactory.defineSearchControllergenerates, and returns the server's{ found, isFoundExact, hits }.foundis the total;isFoundExactisfalsewhen the engine estimates it. A body that is not that envelope throws instead of reading as no match.searchPathsetting andgetSearchPathshook.searchPathrenames the segment after the resource; a subclass overridesgetSearchPaths()to move the whole route.
Who is affected
- Existing callers. No action needed: every new argument and setting is optional.
- A server with its own search routes. IGNIS generates
POST <resource>/searchandPOST <resource>/multi-search, and nosearch/countroute - the total of a search isfound. A route of any other shape stays a call todataSource.read.