Is there any way to fetch metafield filter with type = list.single_line_text_field via storefront?

tomoya_nakano
Shopify Partner
9 0 1

Hi everyone.

I'm struggling with products filtering of storefront API.

The problem I facing is cannot fetch filter of metafield with type = list.single_line_text_field.

 

I've found there are limitation about metafield filter in document below.

https://shopify.dev/custom-storefronts/products-collections/filter-products

 

Product and variant metafield filters are available for metafields defined using the metafield types single_line_text_field ,booleannumeric_integernumeric_decimal using API version2022-04or higher.

I would think it is also able to filter by metafield defined as list.single_line_text_field in custom storefront because I can filter products by metafield defined as list.single_line_text_field in Shopify Theme
Is it able to use metafield types list.single_line_text_field via storefront API?

if it is enabled is there any other cause not for fetching metafield filter types list.string_line_text_field?

 

Regards.

 

 

Replies 2 (2)

ShopifyDevSup
Shopify Staff
1384 229 481

Hi @tomotomy👋

I'd recommend checking to see if the metafield has storefront visibility.

 

Hope that helps!

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

tomoya_nakano
Shopify Partner
9 0 1

I've checked query you mentioned and found the visibility record of the metafield returned, also product query returned the metafield value....😥

However, the metafield filter not found in products and collection query.

I've also set up a metafield filter with the Search & Discovery app.

 

Thanks @ShopifyDevSup