Happening now | Office Hours: Customizing Your Theme With Moeed | Ask your questions now!
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Admin API GraphQL productVariants query failing when fetching metafield based collections by id

Admin API GraphQL productVariants query failing when fetching metafield based collections by id

brdata
Shopify Partner
55 2 15

This Admin API GraphQL productVariant query for the first 10 productVariants from a collection id works correctly. The automated collection with id 288510083230 uses product tags as a condition.

 

 

 

 

{
  productVariants(first: 10, query: "collection:288510083230") {
    edges {
      node {
        id
        displayName
      }
    }
  }
}

 

 

 

 

If I enter the id for an automated collection with conditions based on metafields, the same query fails with an error message.

 

 

 

{
  "errors": [
    {
      "message": "Internal error. Looks like something went wrong on our end.\nRequest ID: 282872fe-851d-4222-b8a0-b782f811954a (include this in support requests).",
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "requestId": "282872fe-851d-4222-b8a0-b782f811954a"
      }
    }
  ]
}

 

 

 

 

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 239 534

Hey @brdata ,

 

I tried the exact same API request as yours on my test store and it worked great so I'm wondering if it may be something to do with the store or a temporary issue with the platform. 

 

If you could contact us via your Partner Dashboard under 'support' , our Partner Support team could gather some more technical details and we could dig in a little further. 

 

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