Skip to content

Commit 4a2d2a3

Browse files
Merge pull request #1804 from strapi/dev/rest-nei-filter
Add `nei` filter operator to REST API docs
2 parents 1be2ea3 + 58ff611 commit 4a2d2a3

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

Diff for: docusaurus/docs/dev-docs/api/entity-service/filter.md

+16
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,22 @@ const entries = await strapi.entityService.findMany('api::article.article', {
174174
});
175175
```
176176

177+
### `$nei`
178+
179+
Attribute does not equal input value (case-insensitive).
180+
181+
**Example**
182+
183+
```js
184+
const entries = await strapi.entityService.findMany('api::article.article', {
185+
filters: {
186+
title: {
187+
$nei: 'abcd',
188+
},
189+
},
190+
});
191+
```
192+
177193
### `$in`
178194

179195
Attribute is contained in the input list.

Diff for: docusaurus/docs/dev-docs/api/query-engine/filtering.md

+16
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,22 @@ const entries = await strapi.db.query('api::article.article').findMany({
177177
});
178178
```
179179

180+
### `$nei`
181+
182+
Attribute does not equal input value (case-insensitive).
183+
184+
**Example**
185+
186+
```js
187+
const entries = await strapi.db.query('api::article.article').findMany({
188+
where: {
189+
title: {
190+
$nei: 'abcd',
191+
},
192+
},
193+
});
194+
```
195+
180196
### `$in`
181197

182198
Attribute is contained in the input list.

Diff for: docusaurus/docs/dev-docs/api/rest/filters-locale-publication.md

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ The following operators are available:
3434
| `$eq` | Equal |
3535
| `$eqi` | Equal (case-insensitive) |
3636
| `$ne` | Not equal |
37+
| `$nei` | Not equal (case-insensitive) |
3738
| `$lt` | Less than |
3839
| `$lte` | Less than or equal to |
3940
| `$gt` | Greater than |

0 commit comments

Comments
 (0)