首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >利用阿波罗和自动气象站对GraphQL进行突变

利用阿波罗和自动气象站对GraphQL进行突变
EN

Stack Overflow用户
提问于 2018-07-12 14:22:29
回答 1查看 122关注 0票数 1
代码语言:javascript
复制
const query = require('graphql-tag');
  const x = query(`
  mutation Hello {
  putPost(
    category: "College",
      institution: "Some College",
      address: "DisneyLand",
      country: "India",
      state: "Some State",
      city: "Some City"
  ){
    category
  }
}`);

  const client = new AWSAppSyncClient({
    url: url,
    region: region,
    auth: {
      type: type,
      apiKey:apiKey,
    }
  });
  console.log(x);

  client.hydrated().then(function (client) {
    return client.mutate({mutation : x})
  }).then(function logData(data) {
    console.log("This is the data returned " + data);
  }).catch(console.error);
}

我正在尝试使用AWS服务和他们的Apollo SDK更改我的数据库,我无法更改我的数据,并出现错误"TypeError: Cannot read property 'queryManager‘of undefined“,有人能帮助我吗?

EN

回答 1

Stack Overflow用户

发布于 2018-07-21 18:39:25

在深入研究了一下之后,我发现这是Aws-appsync模块版本的问题。我安装了'1.0.22‘,一切运行正常。我希望它能帮助一些人。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51298563

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档