NgQubee is a query builder for Angular. Compose your API requests without re-inventing the wheel.
- Reactive — URIs emitted as RxJS observables, state held in Angular Signals
- Pagination ready — typed
PaginatedCollection, fluent navigation (nextPage,lastPage,goToPage) - Test-driven — 980+ specs
- Multi-driver support: API Platform (Symfony), Directus, Django REST Framework, FeathersJS, JSON:API, json-server, Laravel (pagination-only), Spatie Query Builder, NestJS (
nestjs-paginate), @nestjsx/crud, OData, Payload CMS, PocketBase, PostgREST / Supabase, Sieve (.NET), Spring Data REST, Strapi, and WordPress REST
Full documentation lives at ng-qubee.andreatantimonaco.me — driver guides, query-builder API, pagination helpers, auto-generated API reference, and version history.
This README is intentionally minimal. For everything beyond install + a five-line example, head to the docs site.
- Angular ≥ 16 (uses Signals)
- RxJS ^6.5.0 || ^7.0.0
npm i ng-qubeeA driver must be specified in the configuration:
| Driver | Backend | Wire format snapshot |
|---|---|---|
| API Platform | API Platform for PHP/Symfony | field=value, price[between]=10..50, order[field]=desc, page=N&itemsPerPage=N |
| Directus | Directus headless CMS / data platform | filter[field][_eq]=value, sort=-field, fields=col,rel.col, limit=N&page=N |
| DRF | Django REST Framework + django-filter | field=value, field__gte=N, ordering=-field, page=N&page_size=M |
| Feathers | FeathersJS database adapters | field=value, field[$gte]=N, $sort[field]=-1, $select[0]=col, $limit=N&$skip=M |
| JSON:API | Any JSON:API-compliant backend | filter[field]=value, sort=-field, page[number]=N&page[size]=N |
| json-server | json-server mock REST API | field=value, field:gt=N, _sort=-field, q=term, _page=N&_per_page=N |
| Laravel | Plain Laravel pagination | limit=N&page=N (pagination only) |
| Spatie | Spatie Laravel Query Builder | filter[field]=value, sort=-field |
| NestJS | nestjs-paginate |
filter.field=$op:value, sortBy=field:DESC |
| @nestjsx/crud | @nestjsx/crud for NestJS | filter=field||$eq||value, sort=field,ASC, join=relation, page=N&limit=N |
| OData | OData v4 (ASP.NET Core OData, SAP, Microsoft Graph) | $filter=field eq 'value', $orderby=field desc, $expand=rel($select=col), $top=N&$skip=M |
| Payload | Payload CMS / mongoose-paginate-v2 backends |
where[field][equals]=value, sort=-field, select[col]=true, page=N&limit=M |
| PocketBase | PocketBase single-binary backend | filter=(field='value' && other>10), sort=-field, expand=rel, fields=col, page=N&perPage=M |
| PostgREST | PostgREST / Supabase | col=eq.value, order=col.asc, select=col,rel(*), limit=N&offset=M |
| Sieve | Sieve for ASP.NET Core | filters=Field==Value,Other>=N, sorts=-field, page=N&pageSize=N |
| Spring | Spring Data REST (HAL) | sort=field,asc (repeatable), page=N&size=N (0-indexed page) |
| Strapi | Strapi v4 / v5 headless CMS | filters[field][$eq]=value, sort[0]=field:asc, pagination[page]=N&pagination[pageSize]=N |
| WordPress | WordPress REST API | field=value, orderby=field&order=desc, _fields=col, _embed=rel, search=term, page=N&per_page=M |
Per-driver guides — wire format, supported operators, response parsing, customisation — live on the docs site.
import { bootstrapApplication } from '@angular/platform-browser';
import { DriverEnum, NgQubeeService, provideNgQubee, SortEnum } from 'ng-qubee';
bootstrapApplication(AppComponent, {
providers: [provideNgQubee({ driver: DriverEnum.STRAPI })]
});
// In a component or service:
constructor(private _qb: NgQubeeService) {}
this._qb
.setResource('articles')
.addFilter('status', 'published')
.addSort('createdAt', SortEnum.DESC)
.setLimit(10)
.generateUri()
.subscribe(uri => console.log(uri));
// → /articles?filters[status][$eq]=published&sort[0]=createdAt:desc&pagination[page]=1&pagination[pageSize]=10The full query-builder API, pagination helpers, per-driver feature matrices, and TypeScript types are documented at ng-qubee.andreatantimonaco.me.
MIT © Andrea Tantimonaco
