Skip to main content

abTestRetireVariant

Retires a non-control variant of a DRAFT or RUNNING test, keeping the variant and its results; tests saved with createSnapshots also stop that variant's snapshots. Use abTestDeleteVariant to remove a variant from a DRAFT instead. Without per-variant snapshots, retiring an already retired variant or one on a STOPPED test returns the test unchanged. Request only stored fields such as id, name, and status in the response. Requires A/B testing edit access.

abTestRetireVariant(
id: Int!
variantId: Int!
): AbTest!

Arguments​

abTestRetireVariant.id ● Int! non-null scalar​

Test id from abTestList, abTestRefList, or abTestCreate.

abTestRetireVariant.variantId ● Int! non-null scalar​

Numeric variant id from abTestRefList or abTestEditorDetail.variants; must belong to this test.

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.