Context & Use Case
I’m building a multi-store Shopify app that syncs media assets across stores. To track assets reliably, I assign each file a stable unique identifier stored as a metafield (namespace: "app", key: "iid"). This iid is the only truly stable reference since file GIDs, CDN URLs, and filenames are all mutable or context-dependent.
The Problem
While it’s possible to read a metafield on a MediaImage / File when you already know its GID, it is currently impossible to query files by metafield value. The files query does not support metafield-based filtering.
This means I cannot do:
graphql
files(query: "metafields.app.iid:iid_xxx") { ... }
This capability already exists for Products, Customers, Orders, and other resources via the adminFilterable capability. Extending it to Files would bring consistency to the API.
Why This Matters
Without this, the only workarounds are:
-
Maintaining an external database mapping
iid → GID, which adds infrastructure complexity and sync issues -
Using a metaobject as an index, which is hacky, adds sync overhead, and is prone to drift
Both workarounds add complexity for what should be a simple lookup.
Request
Add support for the adminFilterable capability on the FILE / MEDIAIMAGE / GENERICFILE owner types, or otherwise enable metafield-based filtering in the files query.
I’d love to know if this is something on your radar, and whether it could realistically make it into an upcoming API release.
Thanks for your time and consideration!