Releases: nuxt-modules/apollo
Bugfix getAuth function ignored if set
Bugfix of getAuth as option of apollo. Now currently would work for setting a permanent token:
apollo:{
clientConfigs:{
getAuth:() => 'your_permanent_token'
}
}
Add authenticationType to apollo options
A new option is now available as some requests are Basic
or from any other authentication type.
apollo:{
authenticationType: 'Basic' // => default: 'Bearer'
}
The default is Bearer
so you might don't have to change any code in case you use a popular apollo server provider
Bugfix client-server hydration
Bring back cache mechanism for client-server hydration
Cleanup and improved documentation
Minor release towards final release of v4. Improved documentation and contribution guide. Fixed basic test
Zero config for your apollo configurations
To follow the same approach as the vue-cli-plugin-apollo
version 4 will take of the configuration part entirely.
Breaking changes
This results into breaking changes
All you need to provide are the endpoints to your apollo backend:
// nuxt.config.js
apollo:{
clientConfigs: {
default: {
httpEndpoint: YOUR_HTTP_ENDPOINT,
wsEndpoint: YOUR_WS_ENDPOINT
}
}
}
New function calls for login and logout handling
Additionally you can call now 3 functions to make your login/logout handling as easy as possible:
this.$apolloHelpers.onLogin(token) // optional you can provide as second argument this.apolloProvider.clients.otherClient
this.$apolloHelpers.onLogout() // optional you can provide this.apolloProvider.clients.otherClient
this.$apolloHelpers.getToken() // optional you can provide the token name
Updated to most recent vue-apollo
This is only a convenient release to update to the most recent vue-apollo version.
Add option for node_modules file recognition
Added the option to include graphql-tag/loader on node_modules. This is important if you have a npm modules which features graphql files.
options:{
// config
includeNodeModules:true
}
Updated dependencies
Minor update for dependencies and typos. Thanks for the contributions!
Fixed regression with apollProvider
Fixed regression for the use of app.apolloProvider
Thanks @Akryum for the quick fix
Update to vue-apollo beta
Minor release to update to the latest vue-apollo beta