error: createNetworkInterface is not a function on React Native and Apollo Client
error: createNetworkInterface is not a function on React Native and Apollo Client
我一直在尝试在我的 react-native 项目中使用 apollo 客户端,以便我可以连接到一个完全开发的 apollo graphql 服务器。但是,我收到一个错误,表明 createNetworkInterface
不是正确的方法。我应该如何初始化阿波罗客户端? Error from the debugging mobile device
我用来初始化apollo客户端的代码是:
// Initialize the Apollo Client
const client = new ApolloClient({
networkInterface: createNetworkInterface({
uri: 'https://api.graph.cool/simple/v1/ciwce5xw82kh7017179gwzn7q',
}),
})
我真的尽我最大的努力寻找如何实现这个的解决方案,但大多数 tutorials/documentations 是针对 web 的反应,而 none 是针对本机反应。抱歉我的英语不好:(
我一直在尝试在我的 react-native 项目中使用 apollo 客户端,以便我可以连接到一个完全开发的 apollo graphql 服务器。但是,我收到一个错误,表明 createNetworkInterface
不是正确的方法。我应该如何初始化阿波罗客户端? Error from the debugging mobile device
我用来初始化apollo客户端的代码是:
// Initialize the Apollo Client
const client = new ApolloClient({
networkInterface: createNetworkInterface({
uri: 'https://api.graph.cool/simple/v1/ciwce5xw82kh7017179gwzn7q',
}),
})
我真的尽我最大的努力寻找如何实现这个的解决方案,但大多数 tutorials/documentations 是针对 web 的反应,而 none 是针对本机反应。抱歉我的英语不好:(