From 7f921132031dbe7ff7acd028aca7522c0fd0eb7f Mon Sep 17 00:00:00 2001 From: Serhii Plyhun Date: Tue, 12 Mar 2024 09:59:37 +0100 Subject: [PATCH 1/3] SUP-16488: Get back common filters --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index d130cfdff6..98b83f2ada 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -20,7 +20,7 @@ 20.0 3.1.2 - 3.0.2 + 3.0.3 3.1.0 3.3.1 5.5.7 From f7370aadc52d5965ae4589bb961aa7b3747968bb Mon Sep 17 00:00:00 2001 From: Serhii Plyhun Date: Tue, 12 Mar 2024 13:07:19 +0100 Subject: [PATCH 2/3] UT --- .../core/graphql/GraphQLEndpointTest.java | 1 + .../nodes-query-by-uuids-common-filters | 48 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 tests/tests-core/src/main/resources/graphql/nodes-query-by-uuids-common-filters diff --git a/tests/tests-core/src/main/java/com/gentics/mesh/core/graphql/GraphQLEndpointTest.java b/tests/tests-core/src/main/java/com/gentics/mesh/core/graphql/GraphQLEndpointTest.java index b6746f1672..b7576c55c7 100644 --- a/tests/tests-core/src/main/java/com/gentics/mesh/core/graphql/GraphQLEndpointTest.java +++ b/tests/tests-core/src/main/java/com/gentics/mesh/core/graphql/GraphQLEndpointTest.java @@ -161,6 +161,7 @@ protected static Stream> queries() { Arrays.asList("node-tag-query", true, false, "draft"), Arrays.asList("nodes-query", true, false, "draft"), Arrays.asList("nodes-query-by-uuids", true, false, "draft"), + Arrays.asList("nodes-query-by-uuids-common-filters", true, false, "draft"), Arrays.asList("node-breadcrumb-query", true, false, "draft"), Arrays.asList("node-breadcrumb-query-with-lang", true, false, "draft"), Arrays.asList("node-language-fallback-query", true, false, "draft"), diff --git a/tests/tests-core/src/main/resources/graphql/nodes-query-by-uuids-common-filters b/tests/tests-core/src/main/resources/graphql/nodes-query-by-uuids-common-filters new file mode 100644 index 0000000000..8b10d7a85e --- /dev/null +++ b/tests/tests-core/src/main/resources/graphql/nodes-query-by-uuids-common-filters @@ -0,0 +1,48 @@ +{ + orNodes: nodes( uuids: [ "43ee8f9ff71e4016ae8f9ff71e10161c", "4b1346a2163a4ff89346a2163a9ff883" ] + filter: {uuid: { or: [{equals: "43ee8f9ff71e4016ae8f9ff71e10161c"},{equals: "4b1346a2163a4ff89346a2163a9ff883"}] }} + ) { + # [$.data.orNodes.totalCount=2] + totalCount + + elements { + # [$.data.orNodes.elements[0].uuid=43ee8f9ff71e4016ae8f9ff71e10161c] + # [$.data.orNodes.elements[1].uuid=4b1346a2163a4ff89346a2163a9ff883] + uuid + } + } + oneOfNodes: nodes( uuids: [ "43ee8f9ff71e4016ae8f9ff71e10161c", "4b1346a2163a4ff89346a2163a9ff883" ] + filter: {uuid: { oneOf: ["43ee8f9ff71e4016ae8f9ff71e10161c", "4b1346a2163a4ff89346a2163a9ff883"] }} + ) { + # [$.data.oneOfNodes.totalCount=2] + totalCount + + elements { + # [$.data.oneOfNodes.elements[0].uuid=43ee8f9ff71e4016ae8f9ff71e10161c] + # [$.data.oneOfNodes.elements[1].uuid=4b1346a2163a4ff89346a2163a9ff883] + uuid + } + } + andNodes: nodes( uuids: [ "43ee8f9ff71e4016ae8f9ff71e10161c", "4b1346a2163a4ff89346a2163a9ff883" ] + filter: {uuid: { and: [{equals: "43ee8f9ff71e4016ae8f9ff71e10161c"},{equals: "4b1346a2163a4ff89346a2163a9ff883"}] }} + ) { + # [$.data.andNodes.totalCount=0] + totalCount + + elements { + uuid + } + } + notNodes: nodes( uuids: [ "43ee8f9ff71e4016ae8f9ff71e10161c", "4b1346a2163a4ff89346a2163a9ff883" ] + filter: {uuid: { not: {equals: "4b1346a2163a4ff89346a2163a9ff883"}}} + ) { + # [$.data.notNodes.totalCount=1] + totalCount + + elements { + # [$.data.notNodes.elements[0].uuid=43ee8f9ff71e4016ae8f9ff71e10161c] + uuid + } + } +} +# [$.errors=] From 3c5c5513102858a18cd02bf2614609ef9e37c7ca Mon Sep 17 00:00:00 2001 From: Serhii Plyhun Date: Tue, 12 Mar 2024 13:12:07 +0100 Subject: [PATCH 3/3] Changelog --- changelog/src/changelog/entries/2024/03/7715.SUP-16448.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/src/changelog/entries/2024/03/7715.SUP-16448.bugfix diff --git a/changelog/src/changelog/entries/2024/03/7715.SUP-16448.bugfix b/changelog/src/changelog/entries/2024/03/7715.SUP-16448.bugfix new file mode 100644 index 0000000000..9080e62eea --- /dev/null +++ b/changelog/src/changelog/entries/2024/03/7715.SUP-16448.bugfix @@ -0,0 +1 @@ +GraphQL: A regression of missing common `and`, `or`, `not` top level filters has been fixed. \ No newline at end of file