3.8/Drivers/JSON:API Driver
JSON:API Driver
ArchivedThese are the docs for ng-qubee 3.8. Read the 4.0 docs for @qubeejs/angular.
Targets any JSON:API-compliant backend (Rails, Django, .NET, Java, Elixir, …).
Configure
Section titled “Configure”import { DriverEnum, provideNgQubee } from 'ng-qubee';
bootstrapApplication(AppComponent, { providers: [provideNgQubee({ driver: DriverEnum.JSON_API })]});Wire format
Section titled “Wire format”| Concern | Output |
|---|---|
| Filters | filter[status]=active |
| Per-type fields | fields[articles]=title,body&fields[people]=name |
| Includes | include=author,comments.author |
| Sort | sort=-created_at,name (- = DESC) |
| Pagination | page[number]=1&page[size]=15 |
Supported features
Section titled “Supported features”addFilter, addFields, addIncludes, addSort, setLimit, setPage and their delete counterparts.
Unsupported features
Section titled “Unsupported features”addFilterOperator/deleteOperatorFilters→UnsupportedFilterOperatorErroraddSelect/deleteSelect→UnsupportedSelectError(useaddFieldsfor column projection)setSearch/deleteSearch→UnsupportedSearchError
Response shape
Section titled “Response shape”{ "data": [...], "meta": { "current-page": 1, "per-page": 10, "total": 100, "page-count": 10, "from": 1, "to": 10 }, "links": { "first": "url", "prev": "url", "next": "url", "last": "url" }}Default key paths are configured in JsonApiResponseOptions. Override via provideNgQubee({ driver: DriverEnum.JSON_API, response: { /* … */ } }).