What is your goal?
I have a scenario that:
Retrieves a CSV file from SFTP, parses the CSV and runs a Shopify GraphQL mutation to configure/create products
The goal is to set the product title dynamically from a CSV column (e.g. {{2.col6}}) inside the GraphQL productSet mutation.
What is the problem & what have you tried?
The scenario works fine unless the product title contains double quotes. Example: 16" Table Lamp.
Because GraphQL uses double quotes for string values, the mutation breaks when a title contains ". The query becomes invalid and fails.
I’ve tried:
Escaping with "
Using / as an escape
Trying triple quotes
However, in the module input preview it appears the value is still being sent without escaping, and the query fails.
Here’s the relevant part of the mutation:
mutation ConfigureProduct {
productSet(
input: {
title: “{{2.col6}}”
status: ACTIVE…
Error messages or input/output bundles
[200] Error(s):
syntax error, unexpected IDENTIFIER (“Sconce”), expecting COLON at [4, 31]