errorCode: 'INTERNAL_SERVER_ERROR' on bulk query

Topic summary

A developer is encountering a bulk query failure when attempting to retrieve customer data using Shopify’s GraphQL Admin API (version 2025-01).

Technical Setup:

  • Using genql to execute BulkOperationRunQuery
  • Query targets basic customer fields: id, firstName, lastName, email, phone
  • Operation initially shows status as RUNNING

Issue:

  • After a few seconds, the bulk operation fails with errorCode: 'INTERNAL_SERVER_ERROR'
  • Status changes to FAILED
  • No data URL is generated (returns null)
  • rootObjectCount and objectCount both show ‘0’

Timeline & Context:

  • Problem started yesterday (December 15, 2024)
  • The developer is using the latest API version (2025-01)
  • Issue appears to be server-side rather than client-side

Status: Unresolved - seeking explanation for the sudden failure of a previously working bulk query operation.

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

I’m using genql to execute a BulkOperationRunQuery with the following code:

const bulkOperation: BulkOperationRequest = {
  ...everything,
};

const userErrors: UserErrorRequest = {
  field: true,
  message: true,
};

const currentBulkOperationFields: QueryRootRequest = {
  currentBulkOperation: {
    ...bulkOperation,
  },
};

const query = /* GraphQL */ `
  {
    customers {
      edges {
        node {
          id
          firstName
          lastName
          email
          phone
        }
      }
    }
  }
`;

const customersMutation: MutationRequest = {
  bulkOperationRunQuery: [{ query }, { bulkOperation, userErrors }],
};

const client = createGenqlClient({ shopifyDomain, accessToken });

const { bulkOperationRunQuery } = await client.mutation(
  customersMutation,
);

The bulk starts, and for some seconds his status is RUNNING, but after few seconds my bulk fails with the following:

[remix] {
[remix]   completedAt: null,
[remix]   createdAt: '2022-12-16T07:29:18Z',
[remix]   errorCode: 'INTERNAL_SERVER_ERROR',
[remix]   fileSize: null,
[remix]   id: 'gid://shopify/BulkOperation/1737663086651',
[remix]   objectCount: '0',
[remix]   partialDataUrl: null,
[remix]   query: '\n' +
[remix]     '  {\n' +
[remix]     '    customers {\n' +
[remix]     '      edges {\n' +
[remix]     '        node {\n' +
[remix]     '          id\n' +
[remix]     '          firstName\n' +
[remix]     '          lastName\n' +
[remix]     '          email\n' +
[remix]     '          phone\n' +
[remix]     '        }\n' +
[remix]     '      }\n' +
[remix]     '    }\n' +
[remix]     '  }\n',
[remix]   rootObjectCount: '0',
[remix]   status: 'FAILED',
[remix]   type: 'QUERY',
[remix]   url: null,
[remix]   __typename: 'BulkOperation'
[remix] }

This is happening since yesterday. What is happening here? I’m using the latest API version (2022-10).