Skip to content
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

Version draft false clarification #10067

Open
snakemastr opened this issue Dec 19, 2024 · 1 comment
Open

Version draft false clarification #10067

snakemastr opened this issue Dec 19, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@snakemastr
Copy link

Documentation Issue

Related issue: #8077
When enabling versions with drafts and using the draft:false argument in find/findById operations, it's expected to only return published documents.
Yet the operation returns the latest published document OR the latest unpublished document if no published documents exist.

The solution provided in the github issue is to add a where clause to check for status field equals published.

This negates the effect of drafts imo, and I fail to see it's use-case in a production environment. (I either want only published documents or only latest version regardless of status)

Can this be added to the docs, for example in https://payloadcms.com/docs/versions/drafts#reading-drafts-vs-published-documents?

@snakemastr snakemastr added the documentation Improvements or additions to documentation label Dec 19, 2024
@ivkrpv
Copy link

ivkrpv commented Dec 28, 2024

agree, also found this a bit confusing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants