Storefront GraphQL: getting SEO for collections

Gatto
Shopify Partner
1 0 0

Hello,

 

very simple question. How to get SEO fields for a collection using the Storefront APIs?

The docs got no reference for this: Collection (shopify.dev)

Am I missing something?

Reply 1 (1)

Fiischer
Shopify Partner
1 0 0

So it seems that the seo data is not available for the collection but it is for products. A current workaround that i use is metafields on the collection as these are actually available in the storefront api.

 

Metafields can be setup in settings in your store and can be made available in the storefront api without additional configuration if you remember to check the checkbox "make available in the storefront api" when creating the metafield.

 

This is not optimal and quite a workaround i ofc recommed Shopify to supply a better solution. But until then.