1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Fixed how credentials opt is passed to HttpLink (#3269)

Prior to react-apollo 2.0 createNetworkInterface accepted the credentials option in {opt: {credentials: 'policy'}}. HttpLink accepts it as {credentials: 'policy'}.
This commit is contained in:
Kai Yen 2017-11-13 03:20:59 -08:00 committed by Tim Neutkens
parent 80a1603189
commit d72d3c09ef

View file

@ -16,9 +16,7 @@ function create (initialState) {
ssrMode: !process.browser, // Disables forceFetch on the server (so queries are only run once)
link: new HttpLink({
uri: 'https://api.graph.cool/simple/v1/cixmkt2ul01q00122mksg82pn', // Server URL (must be absolute)
opts: {
credentials: 'same-origin' // Additional fetch() options like `credentials` or `headers`
}
credentials: 'same-origin' // Additional fetch() options like `credentials` or `headers`
}),
cache: new InMemoryCache().restore(initialState || {}),
})