【发布时间】:2018-12-20 06:24:39
【问题描述】:
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”,谁能帮助我?
【问题讨论】:
标签: amazon-web-services apollo-client aws-appsync