Skip to content

Update a Tax Category

Updates a tax category's details and re-syncs the tax rates attached to it.

Operation

OperationTypePurpose
updateAdminSettingsTaxCategory(input:)MutationUpdate a tax category and re-sync its tax rates

Input

FieldRequiredMeaning
idyesResource path of the category to update.
codeyesUnique machine code.
nameyesDisplay name.
descriptionyesFree-text description.
taxratesyesA non-empty list of tax-rate ids. Replaces the current set — rates not in the list are detached, and new ones are attached.

taxrates re-syncs the whole set

The taxrates you send becomes the category's complete rate list — it is a full replacement, not an append. It is also required and must be non-empty; an empty array fails with "The taxrates field is required."

Finding ids

Use the adminSettingsTaxCategories query to find the category id, and adminSettingsTaxRates to find tax-rate ids.

The mutation response returns the updated category's scalar fields. The re-synced 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.