# Shopify GraphQL Variable Body error with {{{jsonSerialize record}}}

**URL:** <https://connective.celigo.com/t/shopify-graphql-variable-body-error-with-jsonserialize-record/5768>\
**Category:** Integrator.io\
**Tags:** graphql, shopify\
**Created:** [October 23, 2025, 3:44pm UTC](https://connective.celigo.com/t/shopify-graphql-variable-body-error-with-jsonserialize-record/5768 "2025-10-23T15:44:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidgollom](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/davidgollom/32/6605_2.png) [@davidgollom](https://connective.celigo.com/u/davidgollom)\
**Post date:** [October 23, 2025, 3:44pm UTC](https://connective.celigo.com/t/shopify-graphql-variable-body-error-with-jsonserialize-record/5768/1 "2025-10-23T15:44:19Z")

</div>

Hey There,

Why does using mapper 2.0 and {{{jsonSerialize record}}} work perfectly in the Build Variables preview but when I run the flow I get an invalid JSON error “An invalid JSON is sent in the request.body, error: please ensure that you have wrapped all JSON property names in quotes. details: Expected ',' or '}' after property value in JSON at position 372 (line 1 column 373)”??

This is how the documentation says to build a body and it should work. I’m having to hand code my variable bodies which is super annoying.

Am I doing something wrong??

---

<div class="post-metadata">

**Author:** ![tylerlamparter](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tylerlamparter/32/9204_2.png) [@tylerlamparter](https://connective.celigo.com/u/tylerlamparter)\
**Post date:** [October 23, 2025, 3:45pm UTC](https://connective.celigo.com/t/shopify-graphql-variable-body-error-with-jsonserialize-record/5768/2 "2025-10-23T15:45:39Z")

</div>

Can you try just `{{jsonSerialize record}}`? So 2 curly braces.

---

<div class="post-metadata">

**Author:** ![davidgollom](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/davidgollom/32/6605_2.png) [@davidgollom](https://connective.celigo.com/u/davidgollom)\
**Post date:** [October 24, 2025, 2:36am UTC](https://connective.celigo.com/t/shopify-graphql-variable-body-error-with-jsonserialize-record/5768/3 "2025-10-24T02:36:00Z")

</div>

Thank you guru….

I get a warning in the preview.. “Evaluated result is not valid JSON. Expected property name or '}' in JSON at position 1 (line 1 column 2)”  
But the flow works.  
The jsonSerialize helper prepends the 3 braces when I use it too.

Thanks Tyler!

---

<div class="post-metadata">

**Author:** ![tylerlamparter](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tylerlamparter/32/9204_2.png) [@tylerlamparter](https://connective.celigo.com/u/tylerlamparter)\
**Post date:** [October 24, 2025, 3:08am UTC](https://connective.celigo.com/t/shopify-graphql-variable-body-error-with-jsonserialize-record/5768/4 "2025-10-24T03:08:25Z")

</div>

Yeah the GraphQL connector is a little finicky because the 3 GraphQL specific fields end up concatenating to one field in the backend (HTTP request body). So the merging of those 3 to 1 and correctly escaping quotes etc get tricky.
