Skip to content

Commit ffa4cd1

Browse files
committed
resolves issue #669
1 parent 48e23de commit ffa4cd1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,13 +273,12 @@ Shopify.prototype.graphql = function graphql(data, variables) {
273273
pathname += '/graphql.json';
274274

275275
const uri = { pathname, ...this.baseUrl };
276-
const json = variables !== undefined && variables !== null;
277276
const options = {
278277
agent: this.options.agent,
279-
body: json ? this.options.stringifyJson({ query: data, variables }) : data,
278+
body: this.options.stringifyJson({ query: data, variables }),
280279
headers: {
281280
...this.baseHeaders,
282-
'Content-Type': json ? 'application/json' : 'application/graphql'
281+
'Content-Type': 'application/json'
283282
},
284283
method: 'POST',
285284
parseJson: this.options.parseJson,

0 commit comments

Comments
 (0)