I want to use http headers, actually is reference about use and set up over the vue-apollo.js file with httpLinkOptions. but is possible to use different header in an individual query?
Use the context system.
https://www.apollographql.com/docs/link/links/http/#passing-context-per-query
For example:
export default {
apollo: {
myQuery () {
return {
query: gql`...`,
context: {
headers: { foo: this.fooHeader }
}
}
}
}
}
Most helpful comment
Use the context system.
https://www.apollographql.com/docs/link/links/http/#passing-context-per-query
For example: