??,
我看过很多关于如何在apollo中使用headers和上下文选项的文章,但我不知道如何在vue-apollo中使用它,github中关于这些(https://github.com/vuejs/vue-apollo/issues/713)配置vue-apollo.js的其他问题已经存在,但我想使用headers进行个人查询,这些可能吗?
我对vue-apollo的查询:
apollo:{
getPipedrivePersons: {
query: gql`query{
getPipedrivePersons(
term:"email"
){
id
name
detail{
firstName
lastName
}
email{
value
}
phone{
value
}
}
}
`,
pollInterval: 950,
},
}发布于 2020-07-29 00:37:02
通过使用上下文解决:
context: {
headers: { foo: this.fooHeader }
}https://stackoverflow.com/questions/63123303
复制相似问题