Getting parse error in bulk operation

Topic summary

Bulk GraphQL product export is failing when filtering by product types that contain apostrophes, such as “Men’s Socks”. The query works without escaping, but then the bulk operation completes without returning the expected bulk-operation URL/output; when backslashes are added with addslashes, Shopify returns a parse error: bad Unicode escape sequence.

Key point:

  • The problem is not the bulk operation itself, but how the products(query: ...) search string is quoted inside the GraphQL mutation.

Suggested fix:

  • Use escaped double quotes around search values containing apostrophes, for example \"Men's Socks\", instead of single-quoted values like 'Men's Socks' or backslash-escaped single quotes like 'Men\'s Socks'.

Current status:

  • A likely cause and workaround were identified.
  • No final confirmation is shown yet that the revised query returned the expected bulk-operation result, so the issue appears partially resolved but not fully closed.
Summarized with AI on March 8. AI used: gpt-5.4.

@akshuklait since you have apostrophes in there, I think it would be best to use escaped double quotes on your search strings. For example use \"Men's Socks\" instead of 'Men's Socks' or 'Men\'s Socks'

Best,
Seth.