What's your biggest current challenge? Have your say in Community Polls along the right column.
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.

Simple bulk query action returns 'INTERNAL_SERVER_ERROR'.

Simple bulk query action returns 'INTERNAL_SERVER_ERROR'.

Jordaninkmonkey
Shopify Partner
7 0 7

3/27/2024 4:25pm

 

I am attempting to perform a basic bulkOperationRunQuery operation. I am requesting a list of a store's products that have a certain string in their tags and the request keeps returning:

extensions:
{code: 'INTERNAL_SERVER_ERROR', requestId: '6744ba20-63e3-4ba0-a973-8784ef963a02-1711574262'}
message: 
"Internal error. Looks like something went wrong on our end.\nRequest ID: 6744ba20-63e3-4ba0-a973-8784ef963a02-1711574262 (include this in support requests)."

The actual query looks like this:

mutation {
  bulkOperationRunQuery(
    query:"""
    {
      products(first: 500, query: "tag:'truck'") {
        edges {
          node {
            id
            title
            variants(first: 5) {
              edges {
                node {
                  id
                  title
                }
              }
            }
          }
        }
      }
    }
    """
    ){
      bulkOperation {
        id
        status
      }
      userErrors {
        field
        message
      }
    }
  }

The request works every time in GraphiQL. I am calling this endpoint:

'shopify:admin/api/graphql.json'

I'm sure I'm missing something but without any logs I'm lost. If I left out any pertinent information feel free to ask. 

Replies 3 (3)

Jordaninkmonkey
Shopify Partner
7 0 7

More Info:

I have also tried the most recent endpoint '/admin/api/2024-01/graphql.json'

ShopifyDevSup
Shopify Staff
1453 238 525

Hey @Jordaninkmonkey,

 

I checked our logs for errors related to that request ID and the endpoint / parameters recorded there are "/admin/api/2023-07/graphql?version=2023-07". 

Since the version is already included in the endpoint's path you don't need to append it as an additional parameter. Can you try again with "/admin/api/{{ VERSION }}/graphql.json" instead?

 

If you continue having issues could you also try to replicate the error in an HTTP client with a regular query rather than a Bulk Operation query, and try reducing the number of data requested in a single request?

 

Cheers,

 

- James

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

Mircea_Piturca
Shopify Partner
1548 44 348

I am having the same issue. Doing any simple BulkOperationRunQuery via shopify:admin/api/2024-07/graphql.json will return an INTERNAL_SERVER_ERROR error. It works if I perform this API call from the server but not from an app that uses embedded_app_direct_api_access. 

Is there a reason for this? Any docs? 

 

Finally—Add variant descriptions to your products