Skip to content

Commit

Permalink
Merge branch 'next'
Browse files Browse the repository at this point in the history
  • Loading branch information
tada5hi committed Oct 27, 2022
2 parents c7ee87b + e1d17ee commit 27d270f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
12 changes: 10 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@

This is a library to
- `create`, `drop` & `seed` the (default-) database 🔥
- validate, parse & apply `fields, filter[s], include[s], page and sort` parameter values ( extended **JSON:API** specification)
- manage one or many data-source instances 👻
- parse & apply query parameters (extended **JSON:API** specification & fully typed) to:
- `filter` (related) resources according to one or more criteria,
- reduce (related) resource `fields`,
- `include` related resources,
- `sort` resources according to one or more criteria,
- limit the number of resources returned in a response by `page` limit & offset

**Table of Contents**

Expand Down Expand Up @@ -448,7 +454,9 @@ import UserFactory from 'user.factory';
### Query
The query submodule enables query parameter (fields, filter, ...) values to be build, parsed & validated.
Therefore, the [rapiq](https://www.npmjs.com/package/rapiq) library is used under the hood.
The main functions and types are also exposed by this library.

The query parameter options (allowed, default, ...) are fully typed 🔥 and depend on the (nested-) properties of the target entity passed to
the typeorm query builder.

For explanation proposes,
two simple entities with a relation between them are declared to demonstrate the usage of the query utils:
Expand Down
10 changes: 8 additions & 2 deletions docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@

This is a library to:
- `create`, `drop` & `seed` the (default-) database 🔥
- validate, parse & apply `fields, filter[s], include[s], page and sort` parameter values ( extended **JSON:API** specification)

- manage one or many data-source instances 👻
- parse & apply query parameters (extended **JSON:API** specification & fully typed) to:
- `filter` (related) resources according to one or more criteria,
- reduce (related) resource `fields`,
- `include` related resources,
- `sort` resources according to one or more criteria,
- limit the number of resources returned in a response by `page` limit & offset

::: warning **Important NOTE**

The guide is under construction ☂ at the moment. So please stay patient or contribute to it, till it covers all parts ⭐.
Expand Down
4 changes: 3 additions & 1 deletion docs/guide/query.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Query
The query submodule enables query parameter (fields, filter, ...) values to be build, parsed & validated.
Therefore, the [rapiq](https://www.npmjs.com/package/rapiq) library is used under the hood.
The main functions and types are also exposed by this library.

The query parameter options (allowed, default, ...) are fully typed 🔥 and depend on the (nested-) properties of the target entity passed to
the typeorm query builder.

:::info Info
For more details, get in touch with the rapiq [documentation](https://rapiq.tada5hi.net/).
Expand Down

0 comments on commit 27d270f

Please sign in to comment.