[4.x]: GraphQL is missing the siblingOf()
argument in StructureElementArguments
#12442
Unanswered
denisyilmaz
asked this question in
Ideas
Replies: 2 comments 5 replies
-
It's also missing for Craft CMS 3 |
Beta Was this translation helpful? Give feedback.
5 replies
-
Ok, it gets weirder. When querying the descendants with fixed fields and the workaround mentioned by @brianjhanson it works fine: {
entry(id: ["6871"]) {
title
parent {
title
prevSiblings: descendants(positionedBefore: 6871) {
title
}
nextSiblings: descendants(positionedAfter: 6871) {
title
}
}
children {
title
}
}
} … but if I create a fragment Tab on EntryInterface {
title
}
{
entry(id: ["6871"]) {
title
parent {
...Tab
prevSiblings: descendants(positionedBefore: 6871) {
...Tab
}
nextSiblings: descendants(positionedAfter: 6871) {
...Tab
}
}
children {
...Tab
}
}
} … the result will be again a full list of entries for each aliased |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
Description
We need to query for siblings withing a structure. Currently, there is no way to get all siblings of an entry, only the single next and previous entry.
I checked https://github.com/craftcms/cms/blob/4.4/src/gql/base/StructureElementArguments.php and saw that the argument is missing in this file.
Steps to reproduce
Expected behavior
Should return an array of all siblings of that entry within its structure except itself
Actual behavior
Craft CMS version
4.3.4
PHP version
8.1
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
Beta Was this translation helpful? Give feedback.
All reactions