【发布时间】:2018-09-14 19:29:03
【问题描述】:
我正在使用 apolloClient 向 graphql 服务器发送请求。
然而,由于我的应用程序使用 Redux,我遵循此文档 apollo-redux 能够使用 Redux 实现 apollo 客户端。
这是我客户的代码:
const client = new ApolloClient();
const store = createStore(
combineReducers({
apollo: client.reducer(),
// others
})
然而,client.reducer() 行会引发错误
client.reducer 不是函数
我该如何纠正这个错误
【问题讨论】:
-
你用的是什么版本的阿波罗?
-
它是 2.1.1 - 最后一个
标签: redux apollo react-apollo