From c28bce7fa7a5f490bd04e6056ca5846503c02d12 Mon Sep 17 00:00:00 2001 From: jeroen berrevoets Date: Sat, 17 Jun 2017 22:24:44 +0200 Subject: [PATCH] Fix bad JSON stringify in get requests (#60) --- app/components/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/App.js b/app/components/App.js index 29e85da..e10e0a0 100644 --- a/app/components/App.js +++ b/app/components/App.js @@ -164,7 +164,7 @@ export default class App extends React.Component { url += url.indexOf('?') == -1 ? "?" : "&"; - return fetch(url + "query=" + encodeURIComponent(graphQLParams['query']) + "&variables=" + encodeURIComponent(graphQLParams['variables']), { + return fetch(url + "query=" + encodeURIComponent(graphQLParams['query']) + "&variables=" + encodeURIComponent(JSON.stringify(graphQLParams['variables'])), { method: method, credentials: 'include', headers: Object.assign({}, defaultHeaders, headers),