标签: react-native react-apollo
如何为apollo客户端演示http://dev.apollodata.com/添加提取刷新功能?
似乎graphql函数是一个创建graphql组件的包装器或工厂函数?我应该如何实现graphql组件上的pull to refresh等功能?
someInstance
答案 0 :(得分:1)
graphql()装饰器在refetch()上传递props.data方法。当用户下拉时,调用props.data.refetch()应该为您完成此操作。
graphql()
refetch()
props.data
props.data.refetch()