-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
GraphQL: Cannot set draft on nested relations. Can set draft where draft is not enabled. #4985
Comments
I was running into this with an without GraphQL in #3963 (reply in thread). In Payload v2.16.1, I no longer experience it with the REST API and if I manually add the draft variable to each relationship; however, I am not getting the cascading behavior noted in #6141. |
@evelynhathaway I just tested this and it seems to be working. Can you provide more context? Or possibly a small reproduction? |
@JarrodMFlesch I think the difference is that I am using a global maybe? With this repro: evelynhathaway@9bd24ff And you open {
Menu(draft: true) {
relationship {
text
}
}
} The output is {
Menu(draft: true) {
relationship(draft: true) {
text
}
}
} |
I also ran into this with Rich Text links that are relationships. At least with the Slate editor and GraphQL, there isn't a This prevents rich text relationship links from working if the linked document location changed since the linked document was last published (or since the first draft if no published version exists) @JarrodMFlesch would it be best to reopen this issue, or shall I create new issues to track these sub-issues? |
@evelynhathaway yes that would be super helpful actually! |
This issue has been automatically locked. |
Link to reproduction
No response
Describe the Bug
We have 2 collections.
TopFooterV1 - versioning with draft is NOT enabled.
StaticPageV1 - versioning with draft IS enabled.
1st Issue:
We cannot set a draft argument on the relation:
Would be very helpful if draft, where, locale, limit and sort are available.
2nd Issue:
The schema generator adds
draft
to a collection with versioning and drafts disabled:To Reproduce
As above
Payload Version
2.9.0
Adapters and Plugins
"@payloadcms/bundler-webpack": "^1.0.6", "@payloadcms/db-mongodb": "^1.3.2", "@payloadcms/plugin-cloud-storage": "^1.1.1", "@payloadcms/plugin-sentry": "^0.0.6", "@payloadcms/richtext-slate": "^1.3.1",
The text was updated successfully, but these errors were encountered: