Simple bulk query action returns 'INTERNAL_SERVER_ERROR'.

Jordaninkmonkey
Shopify Partner
2 0 0

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 2 (2)

Jordaninkmonkey
Shopify Partner
2 0 0

More Info:

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

ShopifyDevSup
Shopify Staff
1376 229 479

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