You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/docs/graphql/dataloaders.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@ title: Dataloaders
3
3
sidebar_label: Dataloaders
4
4
---
5
5
6
-
Nestjs-query integrates a standard implementation of [dataloaders](https://www.npmjs.com/package/dataloader/v/2.1.0). Dataloaders are there to solve the `n+1`. Sometimes the default implementation can fail, for example when asynchronous [custom authorizers](./authorization.mdx#custom-authorizer) are used and the `n+1` problem occurs again despite using dataloaders. Then it may be useful to configure the default implementation of the dataloader, for example to pass a custom batch scheduler.
6
+
Nestjs-query integrates a standard implementation of [dataloaders](https://www.npmjs.com/package/dataloader/v/2.2.2). Dataloaders are there to solve the `n+1`. Sometimes the default implementation can fail, for example when asynchronous [custom authorizers](./authorization.mdx#custom-authorizer) are used and the `n+1` problem occurs again despite using dataloaders. Then it may be useful to configure the default implementation of the dataloader, for example to pass a custom batch scheduler.
7
7
8
-
The following example demonstrates how to configure the generated dataloaders. For more information about the dataloader configuration, see the [dataloader documentation](https://www.npmjs.com/package/dataloader/v/2.1.0).
8
+
The following example demonstrates how to configure the generated dataloaders. For more information about the dataloader configuration, see the [dataloader documentation](https://www.npmjs.com/package/dataloader/v/2.2.2).
Copy file name to clipboardExpand all lines: documentation/docs/graphql/dtos.mdx
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ title: DTOs
5
5
importTabsfrom'@theme/Tabs';
6
6
importTabItemfrom'@theme/TabItem';
7
7
8
-
The `query-graphql` package leverages most decorators from [`@nestjs/graphql`](https://docs.nestjs.com/graphql/quick-start) and [TypeGraphQL](https://typegraphql.ml), with the exception of `FilterableField`.
8
+
The `query-graphql` package leverages most decorators from [`@nestjs/graphql`](https://docs.nestjs.com/graphql/quick-start) and [TypeGraphQL](https://typegraphql.com), with the exception of `FilterableField`.
9
9
10
10
## `@FilterableField`
11
11
@@ -148,8 +148,7 @@ export class TodoItemDTO {
148
148
149
149
## `@IDField`
150
150
151
-
By default `nestjs-query` uses the default graphql `ID` scalar, if you need to use a different `graphql``scalar`
152
-
type you can `@IDField` decorator. `nestjs-query` will `scalar` type passed to the `@IDField` for all auto-generated
151
+
By default `nestjs-query` uses the default graphql `ID` scalar, if you need to use a different `graphql``scalar` type you can use `@IDField` decorator. `nestjs-query` will use that `scalar` type passed to the `@IDField` for all auto-generated
153
152
`query` and `mutation` endpoints that rely on an input for the `id` (e.g. `findById`, `updateOne`, `deleteOne`).
154
153
155
154
:::note
@@ -426,7 +425,7 @@ You can override the default `pagingStrategy` to one of the following alternativ
426
425
* `OFFSET` - sets paging to allow `limit` and `offset` fields, and returns an `OffsetConnection`.
427
426
* `NONE` - turn off all paging and always return an `ArrayConnection`.
428
427
429
-
When using the `OFFSET` strategy your the paging arguments for a many query will accept a `limit` and/or `offset`.
428
+
When using the `OFFSET` strategy your paging arguments for a many query will accept a `limit` and/or `offset`.
430
429
This will also change the return type from a `CursorConnection` to an `OffsetConnection`.
Copy file name to clipboardExpand all lines: documentation/docs/graphql/queries/endpoints.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ All examples below assume that a connection is returned but filtering and sortin
99
99
strategies. To read how to page collections read the [paging docs](./paging)
100
100
:::
101
101
102
-
By default if you do not provided an arguments you can query for all records.
102
+
By default if you do not provided an arguments it will uses a default value for [the page size](../dtos#result-page-size) and for the [sorting](../dtos/#default-sort).
Copy file name to clipboardExpand all lines: documentation/docs/graphql/queries/filtering.mdx
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ title: Filtering
5
5
importTabsfrom'@theme/Tabs';
6
6
importTabItemfrom'@theme/TabItem';
7
7
8
-
Filtering in `query-graphql` has has an object based syntax
8
+
Filtering in `nestjs-query` has an object based syntax.
9
9
10
10
For a full reference of filter operations [see filter reference](../../concepts/queries.mdx#filter-reference)
11
11
@@ -88,20 +88,20 @@ The following example filters for all todoItems that are marked completed.
88
88
89
89
## Setting the generated filter-type depth
90
90
91
-
When querying the default filter is one level deep. You can specify the generated filter-type depth by using the QueryOptions decorator on your DTO.
91
+
When querying the default filter is one level deep. You can specify the generated filter-type depth by using the `QueryOptions` decorator on your DTO.
92
92
93
-
You can find the documentation and an example in the [QueryOptions reference](../dtos.mdx#generated-filter-type-depth).
93
+
You can find the documentation and an example in the [`QueryOptions` reference](../dtos.mdx#generated-filter-type-depth).
94
94
95
95
96
96
## Setting a default filter
97
97
98
-
When querying the default filter is empty. You can specify a default filter by using the QueryOptions decorator on your DTO.
98
+
When querying the default filter is empty. You can specify a default filter by using the `QueryOptions` decorator on your DTO.
99
99
100
-
You can find the documentation and an example in the [QueryOptions reference](../dtos.mdx#setting-a-default-filter).
100
+
You can find the documentation and an example in the [`QueryOptions` reference](../dtos.mdx#setting-a-default-filter).
101
101
102
102
103
103
## Setting allowed boolean expressions
104
104
105
-
When filtering you can provide and and or expressions to provide advanced filtering. You can turn off either by using the QueryOptions decorator on your DTO.
105
+
When filtering you can provide `and` and `or` expressions to provide advanced filtering. You can turn off either by using the `QueryOptions` decorator on your DTO.
106
106
107
-
You can find the documentation and an example in the [QueryOptions reference](../dtos.mdx#allowed-boolean-expressions).
107
+
You can find the documentation and an example in the [`QueryOptions` reference](../dtos.mdx#allowed-boolean-expressions).
Copy file name to clipboardExpand all lines: documentation/docs/persistence/services.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: Services
4
4
importTabsfrom'@theme/Tabs';
5
5
importTabItemfrom'@theme/TabItem';
6
6
7
-
`@nestjs-query` provides a common interface to use difference ORMs inorder to query and mutate your data.
7
+
`@nestjs-query` provides a common interface to use different ORMs in order to query and mutate your data.
8
8
9
9
The following ORMs are supported out of the box.
10
10
@@ -170,7 +170,7 @@ export class TodoItemEntity implements Base {
170
170
171
171
### Module
172
172
173
-
The `nestjs-query``typeorm`, `sequelize`, `mongoose`, and 'typegoose' packages provide a module that will add providers
173
+
The `nestjs-query``typeorm`, `sequelize`, `mongoose`, and `typegoose` packages provide a module that will add providers
174
174
to inject auto-created `QueryServices` using the `@InjectQueryService` decorator.
175
175
176
176
In order to use the decorator you will need to use the module that comes with the `nestjs-query` orm module providing it your entities that you want the services created for.
@@ -378,7 +378,7 @@ try {
378
378
379
379
To perform an `aggregate` query you can use the `aggregate` method which accepts a `Filter` and `AggregateQuery`.
380
380
381
-
Supported aggregates are `count`, 'sum', 'avg', `min` and `max`.
381
+
Supported aggregates are `count`, `sum`, `avg`, `min` and `max`.
382
382
383
383
In this example we'll aggregate on all records.
384
384
@@ -672,7 +672,7 @@ This section only applies when you combine your DTO and entity and are using Typ
672
672
673
673
When your DTO and entity are the same class and you have relations defined, you should not decorate your the relations in the DTO with `@Field` or `@FilterableField`.
674
674
675
-
Instead decorate the class with `@CursorConnection`, `@OffsetConnection`, '@UnPagedRelation' or `@Relation`.
675
+
Instead decorate the class with `@CursorConnection`, `@OffsetConnection`, `@UnPagedRelation` or `@Relation`.
0 commit comments