Skip to content

Commit c28bce7

Browse files
jeroenbeskevy
authored andcommitted
Fix bad JSON stringify in get requests (#60)
1 parent 3afac41 commit c28bce7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/components/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export default class App extends React.Component {
164164

165165
url += url.indexOf('?') == -1 ? "?" : "&";
166166

167-
return fetch(url + "query=" + encodeURIComponent(graphQLParams['query']) + "&variables=" + encodeURIComponent(graphQLParams['variables']), {
167+
return fetch(url + "query=" + encodeURIComponent(graphQLParams['query']) + "&variables=" + encodeURIComponent(JSON.stringify(graphQLParams['variables'])), {
168168
method: method,
169169
credentials: 'include',
170170
headers: Object.assign({}, defaultHeaders, headers),

0 commit comments

Comments
 (0)