【发布时间】:2018-12-31 07:32:24
【问题描述】:
我想使用 react-apollo 的客户端从键或查询中重置部分缓存,而不是使用 client.resetStore() 清除整个缓存。
例子:
import { withApollo } from "react-apollo";
import { compose } from "recompose";
import MyComponent from "./MyComponent";
const cleanEspecificCache = ({ client }) => () =>{
// What i do here?
}
const enhance = compose(
withApollo,
withHandlers({cleanEspecificCache})
)
export default enhance(MyComponent);
我怎么做才能让它工作?谢谢!
【问题讨论】:
标签: javascript react-native caching graphql react-apollo