【问题标题】:AWS AppSync subscribe to specific device/user for iOS?AWS AppSync 订阅 iOS 的特定设备/用户?
【发布时间】:2018-11-17 02:08:32
【问题描述】:

我已经为实时数据实施了一个与 AWS AppSync 相关的示例 Swift 项目。
通常,它会为所有安装该应用程序的 iOS 设备订阅数据。
但我只想将数据订阅给特定的设备或用户。
有没有什么好的方法可以做到这一点?
谢谢!

【问题讨论】:

    标签: ios swift amazon-web-services aws-cognito aws-appsync


    【解决方案1】:

    您可以将 GraphQL Arguments 与 AppSync 的订阅一起使用,以订阅特定的设备/用户。

    这里是使用订阅参数的文档:

    https://docs.aws.amazon.com/appsync/latest/devguide/real-time-data.html#using-subscription-arguments

    【讨论】:

      猜你喜欢
      • 2021-09-20
      • 2018-09-30
      • 2019-09-16
      • 2019-12-27
      • 2018-10-06
      • 2020-08-31
      • 2019-04-03
      • 2019-06-15
      • 2018-12-28
      相关资源
      最近更新 更多