Creating draft commands
Added in
eventcatalog@2.48.4
Sometimes, you may want to create a command without immediately publishing it to production. Draft commands allow you to collaborate, gather feedback, or prepare for future changes—without exposing the command as "live" in your catalog
Common Use Cases
- Collaboration & Feedback
- Share a draft command with teammates to gather comments and suggestions before it goes live.
- Versioning with Breaking Changes
- Introduce a new version of a command that includes breaking changes. Keep it in draft mode until it’s fully reviewed and ready for deployment.
- Designing Event Lifecycles
- Use drafts to plan and iterate on command definitions before promoting them to production.
How to add a draft command
To mark an query as a draft, simply add the draft attribute to the frontmatter of the query file.
- Option 1: Add a
draft
attribute to your query frontmatter. - Option 2: Add a
draft
object to your query frontmatter. (recommended)
/commands/UpdateInventoryStock/index.mdx (example)
---
# Uses the default title and summary to mark things as draft in the UI
draft: true
# Or you can specify a title and summary for your draft
draft:
title: "Update Inventory Stock 1.0.1 is in draft"
# Supports markdown
message: |
### New version of Update Inventory Stock command is in draft
This is a new version of the Update Inventory Stock command. It is not yet ready for production. We are still working on it and collecting feedback from the team.
You can use this version in lower environments, **but please be aware that it is still in draft and may change.**
You can still use a previous version of the command, [Update Inventory Stock 1.0.0](/docs/commands/UpdateInventoryStock/1.0.0), until that version is deprecated.
_If you would like to provide feedback, please contact us at [feedback@eventcatalog.io](mailto:feedback@eventcatalog.io) or our slack channel [Order Management](https://join.slack.com/t/eventcatalog/shared_invite/zt-1q900000000000000000000000000000)_
---
When you mark an command as draft, it will show in the UI as a draft command.
Filtering for Draft Commands
If you want to quickly find draft commands, in your architecture, you can use the discover feature and filter for draft commands.
This will remove all resources, and only show the draft commands.