如何解决设置标题上下文后无数据返回
我的请求有问题,我没有得到数据返回,但数据库中的每件事都成功更改,当出现错误时我也会捕获错误,这是我的代码
const process = client.query({
query: USERUPDATEAPI,fetchPolicy: 'no-cache',variables: {
id: this.state.IDUser.toString(),firstname: this.state.FirstName.toString(),lastname: this.state.LastName.toString(),email: this.state.Email.toString()
},context: {
headers: {
authorization: `Bearer ${this.state.Token}`,},}
})
process.then((value) => {
console.log(">>>> " + JSON.stringify(value)) // here is not fired
}).catch((error) => {
console.log("This is error : " + error) // I got error here when error present
})
context: {
headers: {
authorization: `Bearer ${this.state.Token}`,}
请帮忙!!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。