Skip to main content

abTestSaveDraft

Saves settings, notes, and all existing variants of a DRAFT test in one Core database transaction, using the normal audience validation and synchronization. Re-runs the page check and validates supplied patches before committing. Include every stored variant exactly once with its numeric id, keeping the control first; this operation cannot add or remove variants. Non-drafts are rejected under a row lock. Requires A/B testing edit access. Does not publish.

abTestSaveDraft(
id: Int!
args: AbTestCreateInput!
): AbTest!

Arguments​

abTestSaveDraft.id ● Int! non-null scalar​

Existing draft test id from abTestEditorDetail or abTestCreate.

abTestSaveDraft.args ● AbTestCreateInput! non-null input​

Complete draft settings and every existing variant, including its id and intended patch or redirect.

Type​

AbTest object​

A/B test settings and lifecycle returned by test lists, detail queries, and create/update operations. Metrics are populated by list queries; use abTestResultCounts for goal/date-scoped results.