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“,有人能帮助我吗?
发布于 2018-07-21 18:39:25
在深入研究了一下之后,我发现这是Aws-appsync模块版本的问题。我安装了'1.0.22‘,一切运行正常。我希望它能帮助一些人。
https://stackoverflow.com/questions/51298563
复制相似问题