Skip to content

Create a Tax Category

Creates a new tax category and attaches the supplied tax rates to it.

Operation

OperationTypePurpose
createAdminSettingsTaxCategory(input:)MutationCreate a tax category and attach tax rates

Input

FieldRequiredMeaning
codeyesUnique machine code for the category.
nameyesDisplay name.
descriptionyesFree-text description.
taxratesyesA non-empty list of existing tax-rate ids to attach. Each id must already exist.

taxrates is required and must be non-empty

A tax category cannot be created without at least one tax rate. Passing an empty taxrates array (or omitting it) fails with "The taxrates field is required." Discover valid tax-rate ids with the adminSettingsTaxRates query.

The mutation response returns the created category's scalar fields. The attached taxRates connection is not resolved in the mutation payload — re-query adminSettingsTaxCategory and select taxRates { edges { node { _id identifier taxRate } } } to read them back.

Released under the MIT License.