Run Bulk query return INTERNAL_SERVER_ERROR

Topic summary

Bulk operation via Shopify GraphQL consistently fails with INTERNAL_SERVER_ERROR after initiation. The goal was to export data for two specific products using bulkOperationRunQuery with a ProductData fragment (including core fields plus variants(first:1) and images(first:1)).

The mutation starts successfully: bulkOperationRunQuery returns status CREATED (cost 10). However, when checking the BulkOperation node, the operation shows status FAILED with errorCode INTERNAL_SERVER_ERROR, objectCount 0, no URL/partialDataUrl, and completedAt is null (check query cost 1).

Code snippets (mutation and follow-up status query) are central to understanding the issue. No rate limit problems are indicated by throttleStatus.

Another participant reports the same problem, suggesting the issue is reproducible.

No fixes, root causes, or workarounds are provided in the thread. The discussion remains open with key questions unresolved (why the internal server error occurs and whether the query structure is valid for bulk operations).

Summarized with AI on January 24. AI used: gpt-5.

i run bulk query:

mutation bulkOperationRunQuery {
  bulkOperationRunQuery(
		query: """

{
	product1: product(id: "gid://shopify/Product/7412378828966") {
		...ProductData
	}
	product2: product(id: "gid://shopify/Product/7444006273190") {
		...ProductData
	}
}
fragment ProductData on Product {
	id
	title
	status
	productType
	vendor
	description
	descriptionHtml
	tags
	handle
	tracksInventory
	createdAt
	updatedAt
	publishedAt
	seo {
		title
		description
	}
	variants(first:1) {
		edges {
			node {
				id
				title
				barcode
				price
				compareAtPrice
				weight
				weightUnit
				taxable
				taxCode
			}
		}
	}
	images(first:1) {
		edges {
			node {
				id
				url
				width
			}
		}
		
	}
}

		
		"""
	) {
		bulkOperation {
			id
			status
		}
		userErrors {
			field
			message
		}
	}
}

query start execution ok with response:

{
	"data": {
		"bulkOperationRunQuery": {
			"bulkOperation": {
				"id": "gid://shopify/BulkOperation/3681499152550",
				"status": "CREATED"
			},
			"userErrors": []
		}
	},
	"extensions": {
		"cost": {
			"requestedQueryCost": 10,
			"actualQueryCost": 10,
			"throttleStatus": {
				"maximumAvailable": 1000.0,
				"currentlyAvailable": 990,
				"restoreRate": 50.0
			}
		}
	}
}

but after complete query, and check result via query:

query {
  node(id: "gid://shopify/BulkOperation/3681499152550") {  
		... on BulkOperation { id status
    id
		status
		errorCode
    createdAt
    completedAt
    objectCount
    fileSize
    url
    partialDataUrl
		rootObjectCount
		# query
    }
  }
}

i always have response with error INTERNAL_SERVER_ERROR:

{
	"data": {
		"node": {
			"id": "gid://shopify/BulkOperation/3681499152550",
			"status": "FAILED",
			"errorCode": "INTERNAL_SERVER_ERROR",
			"createdAt": "2023-06-02T10:40:25Z",
			"completedAt": null,
			"objectCount": "0",
			"fileSize": null,
			"url": null,
			"partialDataUrl": null,
			"rootObjectCount": "0"
		}
	},
	"extensions": {
		"cost": {
			"requestedQueryCost": 1,
			"actualQueryCost": 1,
			"throttleStatus": {
				"maximumAvailable": 1000.0,
				"currentlyAvailable": 999,
				"restoreRate": 50.0
			}
		}
	}
}

what i do wrong?

1 Like

i have same promlem

1 Like