-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.x]: GraphQL Preview - Ancestor and Parent is missing #16327
Comments
Hi, thanks for getting in touch! Let me check if I understand this right. You have an entry in a structure. That entry has a parent. You edited that entry and, for example, changed the title. You let the changes autosave (but you haven’t fully saved it). You’re querying that entry via GraphQL and using the |
Yes, correct :) |
Thanks! I’m not able to reproduce that. Can you confirm that the parent of the entry you’re querying for has not been added during the edit that hasn’t been fully saved? Can you please share the query and response? |
Response:
as you can see, for some reason, the parent and ancestor are not set, only on the second entry thats not a draft. |
hmm, I’m still not able to reproduce. Any chance you could send your |
I've been able to reproduce this on a fresh install, using Postman to query for entries in a structure. When using a preview token param, I get back the edited/unsaved entry, but the parent is Wiithout the token: |
Aha, I was testing using the Craft 4.13.7 and 5.5.7 are out with a fix. |
Hey, i just updated to Craft 4.13.7 but now, the ancestors and parents are missing for all items in the list. |
@Latex88 You’ll want to clear your data caches, or invalidate GraphQL caches from the Caches utility, yes. |
What happened?
Description
When querying a modified entry in preview mode using GraphQL, the expected parent or ancestor data for the entry is not being returned.
The Issue only seems to ocurr when multiple entries are returned from the query.
Steps to reproduce
Expected behavior
The query should return the modified entry along with its parent and ancestor data, reflecting the hierarchy.
Actual behavior
The response does not include the parent or ancestor data for the modified entry in preview mode.
Craft CMS version
4.12.3
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: