Skip to content

Commit

Permalink
feat: add complex filter
Browse files Browse the repository at this point in the history
  • Loading branch information
sitepark-veltrup committed Jan 9, 2024
1 parent 01f6261 commit a8aaf61
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion docs/develop/graphql/search/filtered-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ Articles can be marked as achrivated in the CMS. This flag ensures that these ar

Complex filter queries can be constructed by combining one or more queries using `and`, `or` or `not` queries.

An 'and' or 'or' query expects a list of filters.
An `and` or `or` query expects a list of filters.

#### And

```graphql
filter: [{ and : [
Expand All @@ -189,6 +191,27 @@ filter: [{ and : [
]}]
```

#### Or

```graphql
filter: [{ or : [
{ objectTypes: ["news"] },
{ sites: ["3952"] }
]}]
```

#### Not

`not` expects a filter definition

```graphql
filter: [{ not : {
objectTypes: ["news"]
}}]
```

#### Combined

These can be combined as required:

```graphql
Expand Down

0 comments on commit a8aaf61

Please sign in to comment.