Add possibility to extend options with path to config file
Pre-release
Pre-release
To fix most recent issues additionally to a simple object based setup you can now add a path to a config file to have full support to provide your own functions (which wasn't possible before this release)
// nuxt.config.js
apollo:{
clientConfigs:{
default: '~/plugins/apollo-default-config.js'
}
}
// plugins/apollo-default-config.js
export default function(context){
return {
httpEndpoint: 'localhost:4000/graphql',
getAuth: () => 'Bearer my-static-api-token'
}
}
This is partly a breaking change. In case you passed a getAuth function as options you need to change your config to a plugin based config shown above.