0

我正在尝试使用 aor-simple-graphql-client 进行管理员休息,并使用 react-boilerplate。

我在尝试创建 Apollo 客户端时遇到了一个简单的错误。

文件:管理员上的 App.js

class App extends Component {
  constructor() {
    super();
    this.state = { restClient: null };
  }

  componentDidMount() {
    createRestClient().then((restClient) => this.setState({ restClient }));
  }

  render() {
    const { restClient } = this.state;

    if (!restClient) {
      return <div>Loading</div>;
    }

    ...

当我导航到 localhost/admin 时,我收到一个错误 Uncaught (in promise) ... restClient 永远不会初始化。我很确定这是一个基本错误,但我无法通过它。

有人可以帮我吗?

我的回购:https ://github.com/romainquellec/cuistot

谢谢。

更多关于错误:它可能只是一个配置错误。我无法初始化 restClient,喜欢 componentDidMount 被调用。

我尝试了不同的方法,灵感来自您的项目,但没有结果。

http://imgur.com/m36EyjC

4

1 回答 1

0

我只是尝试克隆并运行您的项目,但由于缺少软件包,它几乎立即失败。大师有你所有的最新提交吗?

同时,你能在这里发布你的错误细节吗?

吉尔达斯

于 2017-04-14T11:31:50.933 回答