Commit d72d3c09 authored by Kai Yen's avatar Kai Yen Committed by Tim Neutkens

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'}.
parent 80a16031
...@@ -16,9 +16,7 @@ function create (initialState) { ...@@ -16,9 +16,7 @@ function create (initialState) {
ssrMode: !process.browser, // Disables forceFetch on the server (so queries are only run once) ssrMode: !process.browser, // Disables forceFetch on the server (so queries are only run once)
link: new HttpLink({ link: new HttpLink({
uri: 'https://api.graph.cool/simple/v1/cixmkt2ul01q00122mksg82pn', // Server URL (must be absolute) 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 || {}), cache: new InMemoryCache().restore(initialState || {}),
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment