Become a member
Sign in
Quickly develop static websites with VueJS, a headless CMS and GraphQL
1K
13
Marc Mintel
Randy Houlahan
Randy Houlahan
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’
}

}

    Randy Houlahan

    Written by

    Randy Houlahan

    Write the first response

    Discover Medium

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

    Make Medium yours

    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

    Become a member

    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade
    AboutHelpLegal