React native 有没有办法知道在react apollo查询的缓存结果中使用了哪些变量?
我有这样的代码:React native 有没有办法知道在react apollo查询的缓存结果中使用了哪些变量?,react-native,react-apollo,React Native,React Apollo,我有这样的代码: <Query query={AdventuresByLocation} variables={{ longitude, latitude, offset: 0, distance: 25000, limit: 10, }} > {({ loading, data, fetchMore, variables }) => { // I use fetchMore to do somet
<Query
query={AdventuresByLocation}
variables={{
longitude,
latitude,
offset: 0,
distance: 25000,
limit: 10,
}}
>
{({ loading, data, fetchMore, variables }) => {
// I use fetchMore to do something similar to paging and I change offset and/or distance
}}
</Query>
{({加载,数据,获取更多,变量})=>{
//我使用fetchMore做一些类似于分页的事情,并更改偏移量和/或距离
}}
React Apollo具有很好的缓存功能,即它假设我使用fetchMore
进行一些分页,如果缓存中有一个项目,它将在第一次请求时返回大于10个项目的结果。我的问题是:如何知道使用了哪些变量(偏移量和距离)来获得该结果
我尝试使用传递给渲染函数的变量
,但它似乎与传递给Query
组件的变量相同