Skip to main content

abTestSetTrafficSplit

Sets autoReweight and manual traffic weights for the listed variants in any status and returns the test with refreshed metrics. Weights are percentages stored to one decimal place and are not checked to total 100; variants left out keep their weights. Pass an empty variants list to change only autoReweight. Requires A/B testing edit access.

abTestSetTrafficSplit(
id: Int!
autoReweight: Boolean!
variants: [AbTestVariantWeightInput!]!
): AbTest!

Arguments​

abTestSetTrafficSplit.id ● Int! non-null scalar​

Test id from abTestList, abTestRefList, or abTestCreate.

abTestSetTrafficSplit.autoReweight ● Boolean! non-null scalar​

Whether automatic traffic reweighting is enabled; supplied manual weights are saved either way.

abTestSetTrafficSplit.variants ● [AbTestVariantWeightInput!]! non-null input​

Existing variant ids and traffic percentages; omitted variants keep their weights and totals are not validated.

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.