From a8aaf613ed764eb8a140f5ed241c4a867fb177b2 Mon Sep 17 00:00:00 2001 From: veltrup Date: Tue, 9 Jan 2024 16:43:21 +0100 Subject: [PATCH] feat: add complex filter --- .../develop/graphql/search/filtered-search.md | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/docs/develop/graphql/search/filtered-search.md b/docs/develop/graphql/search/filtered-search.md index 9addacb..2ed1021 100644 --- a/docs/develop/graphql/search/filtered-search.md +++ b/docs/develop/graphql/search/filtered-search.md @@ -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 : [ @@ -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