Skip to content

Commit

Permalink
Merge pull request #1596 from gentics/hotfix-2.0.x-sup-16448
Browse files Browse the repository at this point in the history
SUP-16448: Get back common filters
  • Loading branch information
npomaroli authored Mar 19, 2024
2 parents 827b422 + 3c5c551 commit 8369948
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!-- when updating version, don't forget to update administration-guide.asciidoc -->
<graphql.version>20.0</graphql.version>
<graphql-dataloader.version>3.1.2</graphql-dataloader.version>
<graphql-filter.version>3.0.2</graphql-filter.version>
<graphql-filter.version>3.0.3</graphql-filter.version>
<pf4j.version>3.1.0</pf4j.version>
<asm.version>3.3.1</asm.version>
<spring.security.version>5.5.7</spring.security.version>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GraphQL: A regression of missing common `and`, `or`, `not` top level filters has been fixed.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ protected static Stream<List<Object>> 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"),
Expand Down
Original file line number Diff line number Diff line change
@@ -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=<is-undefined>]

0 comments on commit 8369948

Please sign in to comment.