diff --git a/src/network-layer/default/RelayDefaultNetworkLayer.js b/src/network-layer/default/RelayDefaultNetworkLayer.js index 6d45067f4778d..96460c190c11d 100644 --- a/src/network-layer/default/RelayDefaultNetworkLayer.js +++ b/src/network-layer/default/RelayDefaultNetworkLayer.js @@ -125,7 +125,7 @@ class RelayDefaultNetworkLayer { init = { body: JSON.stringify({ query: request.getQueryString(), - variables: JSON.stringify(request.getVariables()), + variables: request.getVariables(), }), headers: {'Content-Type': 'application/json'}, method: 'POST', @@ -142,7 +142,7 @@ class RelayDefaultNetworkLayer { return fetchWithRetries(this._uri, { body: JSON.stringify({ query: request.getQueryString(), - variables: JSON.stringify(request.getVariables()), + variables: request.getVariables(), }), fetchTimeout: this._timeout, headers: {'Content-Type': 'application/json'}, diff --git a/src/network-layer/default/__tests__/RelayDefaultNetworkLayer-test.js b/src/network-layer/default/__tests__/RelayDefaultNetworkLayer-test.js index d2742014e1e50..92d410b138bcb 100644 --- a/src/network-layer/default/__tests__/RelayDefaultNetworkLayer-test.js +++ b/src/network-layer/default/__tests__/RelayDefaultNetworkLayer-test.js @@ -111,7 +111,7 @@ describe('RelayDefaultNetworkLayer', () => { }); expect(body).toEqual(JSON.stringify({ query: request.getQueryString(), - variables: JSON.stringify(variables), + variables: variables, })); }); @@ -195,7 +195,7 @@ describe('RelayDefaultNetworkLayer', () => { var {body, fetchTimeout, method, retryDelays} = call[1]; expect(body).toBe(JSON.stringify({ query: requestA.getQueryString(), - variables: JSON.stringify(queryA.getVariables()), + variables: queryA.getVariables(), })); expect(fetchTimeout).toBe(networkConfig.timeout); expect(method).toBe('POST');