Skip to content

Commit

Permalink
Add defaultOptions object to ClientConfig for createApolloClient()
Browse files Browse the repository at this point in the history
  • Loading branch information
Fju committed Oct 10, 2020
1 parent 9f4f6ba commit 2881942
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/templates/plugin.js
Expand Up @@ -65,6 +65,10 @@ export default (ctx, inject) => {
<%= key %>ClientConfig.httpEndpoint = <%= key %>ClientConfig.browserHttpEndpoint
}

<% if (options.defaultOptions) { %>
<%= key %>ClientConfig.apollo = { defaultOptions: <%= JSON.stringify(options.defaultOptions) %> }
<% } %>

<%= key %>ClientConfig.ssr = !!process.server
<%= key %>ClientConfig.cache = <%= key %>Cache
<%= key %>ClientConfig.tokenName = <%= key %>TokenName
Expand Down

0 comments on commit 2881942

Please sign in to comment.