【问题标题】:AmazonAppSyncClient() constructor not implemented exception in xamarinAmazonAppSyncClient() 构造函数未在 xamarin 中实现异常
【发布时间】:2020-02-23 22:17:05
【问题描述】:

我想在 xamarin 中使用 AWS AppSync,

这是我使用的代码(使用 graphQL),如下所述:

https://gist.github.com/NeilBostrom/cab8b9275e39bb90ecf8e06ab980664b

但我得到了 AmazonAppSyncClient() 构造函数未实现异常

    public GraphQLService()
    {
            credentials = new CognitoAWSCredentials("Identity-pool-ID", // Identity pool ID
                             RegionEndpoint.USWest2 // Region
                             );
            graphQLClient = new GraphQLClient("https://6vl6q5h2c5bxrbmlimiia5hldy.appsync-api.us-west-2.amazonaws.com/graphql",
                 new GraphQLClientOptions
                 {
                     HttpMessageHandler = new AWS4SignerMessageHandler(
                                               new AmazonAppSyncClient(),
                                               "AKIAIPYMG6M3MLZELEKA",
                                               "tW4NrTvfT5bX8DGI2GusiNWHtWB+9s918uq9QMWp")
                 });

    }

请问有什么解决办法吗?

谢谢。

【问题讨论】:

    标签: c# amazon-web-services xamarin graphql aws-appsync


    【解决方案1】:

    这听起来像是不支持 AmazonAppSyncClient。话虽如此,鉴于它的 GraphQL,您可以使用任何 HTTP 客户端来访问 AppSync API。看起来您可以通过更改 AWS4SignerMessageHandler 和 AmazonHttpRequestSigning 的实现来解决此问题,使其不依赖于 AmazonServiceClient。看看你的要点,看起来你使用它的唯一原因是the endpoint & region hereconfig here 我认为你可以自己建立一个谷歌搜索让我找到这些api docs

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-28
      • 2012-04-14
      相关资源
      最近更新 更多