到目前为止,我发现的所有示例都显示了如何.subscribe
到.watchQuery
结果,然后(如果需要)如何.subscribeToMore
输入新条目。检查示例:
this.appsync.hydrated().then(client => {
const observable = client.watchQuery({
query: query,
otherOptions: ...
});
observable.subscribe(dosome);
observable.subscribeToMore({
document: subscription,
otherOptions: ...
});
});
但是,如果我没有要查询的先前查询而只想被通知有关已订阅的订阅该怎么办?