From ffa4cd15e2cfed8573dbeb3fdd9d6cf8272574b8 Mon Sep 17 00:00:00 2001 From: Kyle Tate Date: Fri, 7 Feb 2025 11:36:05 -0500 Subject: [PATCH] resolves issue #669 --- index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index a4337eef..14616cfd 100644 --- a/index.js +++ b/index.js @@ -273,13 +273,12 @@ Shopify.prototype.graphql = function graphql(data, variables) { pathname += '/graphql.json'; const uri = { pathname, ...this.baseUrl }; - const json = variables !== undefined && variables !== null; const options = { agent: this.options.agent, - body: json ? this.options.stringifyJson({ query: data, variables }) : data, + body: this.options.stringifyJson({ query: data, variables }), headers: { ...this.baseHeaders, - 'Content-Type': json ? 'application/json' : 'application/graphql' + 'Content-Type': 'application/json' }, method: 'POST', parseJson: this.options.parseJson,