editTaxonomyTerm mutation should be used.
A PATCH method is used for editing. It means that only not empty properties will be updated.
If a parent should be set, an appropriate term can be found with getTaxonomyTermByName query
Access policy:
- The API user context should have permission to update the given taxonomy term.
- A term with the given ID should exist on the site.
- If parent ID is set and is not equals to 0, a term with this ID should exist.
termId- ID of the taxonomy term that should be updated;termData- the object with the following properties:
Now let’s update the term that was created in the previous step (see Create a taxonomy term for more details).
We will remove the parent and update the term title.
