Fetching Metafields from Shopify has been a point of pain and anguish for some time now, as every developer who has tried to retrieve them in bulk using the REST API will know… it can’t be done… not quickly anyway.
Thankfully the Shopify dev team have been busy on a number of improvements to their API, most notably the Shopify GraphQL Bulk API, which allows you to retrieve an entire store’s worth of Metafields at very little cost, as the majority of the processing is being done behind the scenes at their end.
I spent a long time digging into this and Shopify were kind enough to publish my findings on their Partner Blog. Take a look for yourself: Faster Retrieval of Shopify Metafields with GraphQL