Changelog - 2026-10-23
The HTTP repository can call the find-one route
EnhancementIn one line. Pass findOnePath: 'find-one' and findOne reads the route defineCrudController generates, the way countPath already names the count route.
typescript
super({ dataSource, resource: 'products', findOnePath: 'find-one' });
const product = await productRepository.findOne({ filter: { where: { sku: 'LAMP-1' } } });
// GET /products/find-one?filter=... -> the row, or nullWhat changed
findOnePathoption. Named,findOneasksGET /<resource>/<findOnePath>with the filter in the query string and returns the row. The route answers a missing row with HTTP 200 and no row, sofindOnereturnsnull, never an error.- Off by default. Without it
findOneasks the list route for one row, as before. A backend that is not an IGNIS controller may not have the route. querystill applies. The caller's extraqueryand thebuildQueryhook reshape this route like every other read.
Who is affected
- Everyone. No action needed; nothing changes until you pass
findOnePath.
| File | Package |
|---|---|
src/http/repository.ts | connectors |