Skip to content

Commit

Permalink
Merge branch 'francoisp-master' into fix-missing-headers-cookies-in-ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
kieusonlam committed Sep 10, 2019
2 parents 89fb773 + 7f59deb commit 02a8435
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/templates/plugin.js
Expand Up @@ -58,6 +58,10 @@ export default (ctx, inject) => {
<%= key %>ClientConfig.ssr = !!process.server
<%= key %>ClientConfig.cache = <%= key %>Cache
<%= key %>ClientConfig.tokenName = <%= key %>TokenName

// if ssr we'd still like to have our webclient's cookies
if (process.server && req && req.headers && req.headers.cookie)
<%= key %>ClientConfig.httpLinkOptions.headers={cookie:req.headers.cookie}

// Create apollo client
let <%= key %>ApolloCreation = createApolloClient({
Expand Down

0 comments on commit 02a8435

Please sign in to comment.