AWS AppSync无需先前的.watchQuery即可订阅GrapQL订阅

时间:2018-07-26 17:16:39

标签: graphql aws-appsync

到目前为止,我发现的所有示例都显示了如何.subscribe.watchQuery结果,然后(如果需要)如何.subscribeToMore输入新条目。检查示例:

  this.appsync.hydrated().then(client => {
    const observable = client.watchQuery({
      query: query,
      otherOptions: ...
    });
    observable.subscribe(dosome);
    observable.subscribeToMore({
      document: subscription,
      otherOptions: ...
    });
  });

但是,如果我没有要查询的先前查询而只想被通知有关已订阅的订阅该怎么办?

0 个答案:

没有答案