From c5e6b11e61ac64a9cf83bbd42559a268096c2b51 Mon Sep 17 00:00:00 2001 From: Brandon Bloom Date: Wed, 12 Oct 2016 14:28:04 -0700 Subject: [PATCH] Support Cookies Fixes #40. See this corresponding change in express-graphql: https://github.com/graphql/express-graphql/pull/30 --- app/components/App.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/components/App.js b/app/components/App.js index 2caf943..8aab490 100644 --- a/app/components/App.js +++ b/app/components/App.js @@ -166,12 +166,14 @@ export default class App extends React.Component { return fetch(url + "query=" + encodeURIComponent(graphQLParams['query']) + "&variables=" + encodeURIComponent(graphQLParams['variables']), { method: method, + credentials: 'include', headers: Object.assign({}, defaultHeaders, headers), body: null }).then(response => response.json()); } return fetch(endpoint, { method: method, + credentials: 'include', headers: Object.assign({}, defaultHeaders, headers), body: JSON.stringify(graphQLParams) }).then(response => response.json());