Skip to main content

Drafts

Drafts let you change a query without immediately affecting the live version. This is essential when a query is already shared or published as an API, and you want to edit it safely.

How drafts work​

When you edit a live query, your changes can be kept as a draft:

  • The published version keeps serving shared links and the public query API.
  • The draft holds your in-progress changes until you decide what to do. Inside Kvery the query runs in its draft version — in the editor, on dashboards and through the MCP server and its REST API.

This means you can iterate on SQL and test it while shared links and the public query API keep serving the published version, and only switch them over to the new version when you are confident.

Reviewing the draft diff​

Before publishing, view the diff between the published version and the draft. The diff highlights exactly what differs in the SQL, so you can confirm the change is what you intended and avoid surprises for anyone consuming the query.

Publishing a draft​

Publish promotes the draft to be the live version. From that moment, shared links and public API endpoints use the new SQL as well. The previous version is preserved in history so you can always roll back.

Discarding a draft​

If you decide not to keep your changes, discard the draft. The live version is untouched and your draft changes are dropped; from then on, dashboards and the MCP server run the published version.

  1. Open the live query and make your changes — they are held as a draft.
  2. Run the draft to test it.
  3. Review the draft diff to confirm the change.
  4. Publish to go live, or discard to abandon the change.

Because every publish is captured in history, even a mistaken publish can be rolled back quickly.