Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native 有没有办法知道在react apollo查询的缓存结果中使用了哪些变量?_React Native_React Apollo - Fatal编程技术网

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
组件的变量相同