[英]React Native Apollo Client doesn't fetch all data
I have the following query: 我有以下查询:
query(abc: 1) {
id
level1 {
id
level2 {
level3a {
id
}
level3b {
id
}
}
}
}
In my browser (using GraphiQL) everything returns fine, but when I try to run the exact same query on my Apollo Client it returns null for level2. 在我的浏览器中(使用GraphiQL),一切正常,但是当我尝试在Apollo Client上运行完全相同的查询时,它为level2返回null。
client.query({query: myQuery}).then((resp) => {
This is how I'm using it, any idea on why it's returning null on the client? 这就是我的使用方式,对为什么它在客户端上返回null有任何想法吗?
If any more information is needed, let me know! 如果需要更多信息,请告诉我! Thank you!
谢谢!
I have no idea why, but running: 我不知道为什么,但运行:
client.query({query: myQuery, fetchPolicy: "no-cache"})
I'm guessing deep objects can't be cached.. If anyone can add an explanation I'll edit it in. Thank you 我猜深的对象无法缓存。如果有人可以添加说明,我将其进行编辑。谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.