Is there an API for all customer/order/product tags used?

Background

It’s pretty typical for a Shopify app to provide functionality or filtering based on tags on a given resource.

This includes customer, order, product tags, etc.

Goal

Improve UX by presenting merchants with autocomplete options when typing in a tag name into a Shopify App.

Constraints

I don’t believe there is a list of all used tags for a given resource, so the best you can do is use a sample of the last N resources to guesstimate tags.

Suggestion

For each top level resource that’s taggable, include a tagsMeta object where we can view all tags within the particular account:

customers {
  tagsMeta {
     availableTags
   }
}

Just a thought!

Apologies if I’m misunderstanding here, but does this suffice?

1 Like

Thanks @Luke ! Nice find.

If only it could accept a search param to make it fully autocomplete, but I’ll take it.

Indeed! But a workaround, if you retrieve them all, then throw the results into this:

Found it to work pretty nice, I’ve used the same when building an app and doing filters to allow the user to filter out by all tags etc.

Shout me of you need a hand getting it setup!