Jungle allows you to tag almost any object in the platform. Tags can be informative, and they help with sorting and filtering objects. Tags can be retrieved when retrieving an object from the API.
Applying a Tag
You can tag an object like so:
mutation TagAdd {
tagAdd(
input: {
object: { id: "xid:jungle/Product:shopify/productid/my-shop:1234", typename: "Product" }
tags: ["awesome-product"]
}
) {
... on MutationSuccess {
ok
}
... on MutationFailure {
reason
}
}
}
Removing a Tag
You can remove an object tag like so:
mutation TagRemove {
tagRemove(
input: {
object: { id: "xid:jungle/Product:shopify/productid/my-shop:1234", typename: "Product" }
tags: ["awesome-product"]
}
) {
... on MutationSuccess {
ok
}
... on MutationFailure {
reason
}
}
}
Reading Object Tags
You can retreive an object with its tags with the following query:
query GetProduct {
object(input: { id: "xid:jungle/Product:shopify/productid/my-shop:1234", typename: "Product" }) {
id
... on Product {
tags
}
}
}
Which produces a result like this:
{
"data": {
"object": {
"id": "123ABC",
"tags": ["awesome-product"]
}
}
}