Sep 9, 2018 · 1 min read
You need to put your auth in a separate file like this:
~/apollo/config.js
export default function(context){
return {
httpEndpoint: ‘https://graphql.datocms.com'
getAuth:() => ‘my-token’ //Bearer is added by default
}
}
Then in nuxt.config.js
apollo:{
clientConfigs: {
default: ‘~/apollo/config.js’
}
}