How to query a Customer by Metafield Using GraphQL API 2023-04?

Hi,

I want to query a Customer filtered by it’s metafield key/value. How can I achieve this?

1 Like

There’s no way to filter directly when querying customers, but segmentation will do what you’re looking for! For your convenience, here’s a link with some information on customer segments, which conveniently has an API that you can use to manage the segments and query customers who are a part of that segment.

Hope this helps!

1 Like

Thanks a lot! That looks like it could work for my needs. I will try that and accept the answer if it works.