Skip to content

Commit

Permalink
Support Cookies (#44)
Browse files Browse the repository at this point in the history
Fixes #40.

See this corresponding change in express-graphql: graphql/express-graphql#30
  • Loading branch information
brandonbloom authored and skevy committed Oct 15, 2016
1 parent fa65b29 commit 9c5f7ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

1 comment on commit 9c5f7ae

@yrashk
Copy link

@yrashk yrashk commented on 9c5f7ae Oct 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any plans to make a release with this feature?

Please sign in to comment.