-
Bug ReportI found our draft articles and unpublished articles are shown in prod env. Steps to Reproduce
Input this query and execute:
Other Details |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Do I have to use this query to filter out
|
Beta Was this translation helpful? Give feedback.
-
Your understanding in your second comment is correct - the We do have docs about this - take a look here: Basically, the Does that make sense? I will convert this to a discussion as I don't believe there's anything actionable to be done here. What do you think? |
Beta Was this translation helpful? Give feedback.
-
@jmikrut An additional question, as I checked the doc and the ts interface, it seems there's no way I can get the graphql query variables from the access function. I want to implement sth like this as the default access for our articles:
|
Beta Was this translation helpful? Give feedback.
Your understanding in your second comment is correct - the
draft: true
argument replaces any docs in your main collection with their newest drafts, which would be stored in the_versions
collection.We do have docs about this - take a look here:
https://payloadcms.com/docs/versions/drafts#controlling-who-can-see-collection-drafts
Basically, the
draft
argument alone does not restrict who can see drafts. If you need that, you need to do that with access control. Thedraft
arg simply does what is stated above.Does that make sense? I will convert this to a discussion as I don't believe there's anything actionable to be done here. What do you think?