Skip to content

docs: enhance drafts documentation with examples for REST, Local, and GraphQL APIs #12575

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GermanJablo
Copy link
Contributor

An attempt to prevent the #11723 confusion from happening again.

await payload.create({
collection: 'your-collection',
data: {
// your data here
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've run a test, and it seems that _status: "draft" isn't required; draft: true is sufficient.

On another note, I think I found a bug. TypeScript complains that data doesn't contain required fields even with draft: true. Could someone confirm?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened an issue about that: #12578

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

Successfully merging this pull request may close these issues.

1 participant