Storefront GQL API collectionByHandle throwing internal error

Topic summary

A developer is encountering an INTERNAL_SERVER_ERROR when querying the Storefront GraphQL API’s collectionByHandle method. The query previously worked but now fails consistently across multiple stores.

Error Details:

  • Returns internal server error with request ID
  • Occurs even with minimal queries (just requesting id or handle fields)
  • Affects multiple stores, not isolated to one shop

Troubleshooting Attempted:

  • Simplified queries down to single fields still fail
  • Products and collections are confirmed published and available
  • Issue persists regardless of query complexity

Support Response:

  • The exact query works when tested by Shopify support
  • Recommended steps: verify products/collections are published, simplify queries to isolate the problematic field
  • Suggested contacting support through help center or Partner Support (if developer has collaborator access to affected stores)

Status: Unresolved. The developer needs to escalate to Shopify support with store-specific details for further investigation.

Summarized with AI on November 13. AI used: claude-sonnet-4-5-20250929.

Hi!
I’m facing an error with Storefront GQL API collectionByHandle method, this request were working before, but now it is throwing following error:

[{'message': 'Internal error. Looks like something went wrong on our end.\\nRequest ID: ff0c34da-ee73-4b98-b0e9-2687619ea4c6 (include this in support requests).', 'extensions': {'code': 'INTERNAL_SERVER_ERROR', 'requestId': 'ff0c34da-ee73-4b98-b0e9-2687619ea4c6'}}]

That is the example of the query I’m making :

query MyQuery {
  collectionByHandle(handle: "frontpage") {
    id
    title
    handle
    products(sortKey: BEST_SELLING, reverse: false, first: 10) {
      edges {
        cursor
        node {
          id
          tags
          title
          handle
          totalInventory
          options {
            name
            values
          }
          images(first: 1) {
            edges {
              node {
                url(transform: {maxHeight: 500, maxWidth: 500})
              }
            }
          }
          priceRange {
            maxVariantPrice {
              amount
              currencyCode
            }
            minVariantPrice {
              amount
              currencyCode
            }
          }
          variants(first: 10) {
            edges {
              node {
                id
                sku
                title
                availableForSale
                image {
                  id
                  url(transform: {maxHeight: 500, maxWidth: 500})
                }
                selectedOptions {
                  name
                  value
                }
                compareAtPrice {
                  amount
                  currencyCode
                }
                price {
                  amount
                  currencyCode
                }
                quantityAvailable
              }
            }
          }
          compareAtPriceRange {
            maxVariantPrice {
              amount
              currencyCode
            }
            minVariantPrice {
              amount
              currencyCode
            }
          }
        }
      }
      pageInfo {
        hasNextPage
        hasPreviousPage
      }
    }
  }
}

Request ID for reference: ff0c34da-ee73-4b98-b0e9-2687619ea4c6

Hey @saylau ,

Thanks for sharing that. Testing your exact query here it is working for me.

What I would recommend is to do some further troubleshooting. First, make sure that the products and collections are published and available.

From there, I would work at simplifying the query starting with a single field and slowly add in the additional fields you need. That will help narrow down the specific part of the query that is returning the error.

If the issue is persisting after that, reach out to our support teams by logging in to the help center so we can take a closer look at your specific store details and requests to narrow down the issue.

Hope that helps,

  • Kyle G.

Hi, Kyle!

  1. All products and collections, are published and available. Besides if some are not, shouldn’t it just leave that out of response, and show all other contents

  2. For me its not working even like this:

{
  collectionByHandle(handle: "") {
    handle
  }
}

or like this

{
  collectionByHandle(handle: "some-handle") {
    id
  }
}

this all gives the same response

Sure I’ll go with this to support
Thanks for your reply!

Also I facing this issue with many stores
Can you point me in right direction, should i contact support through a store account?

Hey @saylau , if you have a partner account with collaborator access and the appropriate permissions to the stores experiencing this, then Partner Support would be the best place to reach out, otherwise, reaching out logged in to one of the stores experiencing this will work as well.

Thanks,

  • Kyle G.