Skip to content

Commit

Permalink
Fix bad JSON stringify in get requests (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenbe authored and skevy committed Jun 17, 2017
1 parent 3afac41 commit c28bce7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit c28bce7

Please sign in to comment.