I am trying to establish if it is possible to query for Orders resources that match metafield values.
I know that I can query single order using orderByIdentifier
query (Working with custom IDs) and I tried that and it succeeds. However, I need a solution to query for multiple values of a single metafield to obtain list of multiple Order resources.
There is a section in the docs which describes that one can query for Products resources using products(first: 20, query: "metafields.custom.material:\"cotton\"")
query (Query by metafield value).
However, it apparently works only with Products - I tried it with Orders and it fails.
The same approach is listed here: Use metafield capabilities with a Products example as well.
I tried to apply adminFilterable
capability on my Orders Metafields definitions (single_line_text_field
), but the mutation returns "The definition is not eligible to be used as an admin filter."
error.
I did my tests using 2025-04 release-candidate API version.
As currently implemented, is it possible to perform such Orders search? What I am trying to ultimately achieve is a query to search for Orders by Metafield values using a query built on alternative of predicated, e.g. my_metafield=VAL1 OR my_metafield=VAL2 OR ...
.