aws-appsync

AWS Amplify AppSync Subscription not working correctly

孤街浪徒 提交于 2021-02-19 05:27:04
问题 I wrote a small application that subscribes to DB changes using AWS Amplify CLI / AppSync. All amplify api calls work perfectly (mutations, queries) but unfortunately the observer does not receive events. I can see that the MQTT socket receives periodically binaries but I can't obtain changed objects. I configured Amplify for amplify use. I can see in the debugger that the AppSyncProvider has been initisalised. Also tried API and PubSub but makes no difference. const awsmobile = { "aws

AWS Amplify AppSync Subscription not working correctly

与世无争的帅哥 提交于 2021-02-19 05:26:35
问题 I wrote a small application that subscribes to DB changes using AWS Amplify CLI / AppSync. All amplify api calls work perfectly (mutations, queries) but unfortunately the observer does not receive events. I can see that the MQTT socket receives periodically binaries but I can't obtain changed objects. I configured Amplify for amplify use. I can see in the debugger that the AppSyncProvider has been initisalised. Also tried API and PubSub but makes no difference. const awsmobile = { "aws

AWS AppSync query returns cached response even when offline is disabled

最后都变了- 提交于 2021-02-19 02:52:19
问题 I have a fairly simple node app using AWS AppSync. I am able to run queries and mutations successfully but I've recently found that if I run a query twice I get the same response - even when I know that the back-end data has changed. In this particular case the query is backed by a lambda and in digging into it I've discovered that the query doesn't seem to be sent out on the network because the lambda is not triggered each time the query runs - just the first time. If I use the console to

AWS CDK setup appsync with dynamodb table permissions

前提是你 提交于 2021-02-11 06:18:26
问题 I am using the new higher level GraphqlAPI class instead of the lower level constructs to create my Appsync api and connect it to a table. this.api = new GraphqlApi(...); The new GraphqlApi instance allows you to simply add datasources: this.api.addDynamoDbDataSource('name', tableRef); If you look at the example code at https://docs.aws.amazon.com/cdk/api/latest/docs/aws-appsync-readme.html, I notice that they do not create a role to grant permission for Appsync to access the table: const

AWS CDK setup appsync with dynamodb table permissions

余生长醉 提交于 2021-02-11 06:18:26
问题 I am using the new higher level GraphqlAPI class instead of the lower level constructs to create my Appsync api and connect it to a table. this.api = new GraphqlApi(...); The new GraphqlApi instance allows you to simply add datasources: this.api.addDynamoDbDataSource('name', tableRef); If you look at the example code at https://docs.aws.amazon.com/cdk/api/latest/docs/aws-appsync-readme.html, I notice that they do not create a role to grant permission for Appsync to access the table: const

AWS CDK setup appsync with dynamodb table permissions

寵の児 提交于 2021-02-11 06:17:42
问题 I am using the new higher level GraphqlAPI class instead of the lower level constructs to create my Appsync api and connect it to a table. this.api = new GraphqlApi(...); The new GraphqlApi instance allows you to simply add datasources: this.api.addDynamoDbDataSource('name', tableRef); If you look at the example code at https://docs.aws.amazon.com/cdk/api/latest/docs/aws-appsync-readme.html, I notice that they do not create a role to grant permission for Appsync to access the table: const

Unit Test GraphQL schemas/queries made in AWS AppSync?

六月ゝ 毕业季﹏ 提交于 2021-02-08 08:21:40
问题 I have a simple question: is there a way/program/method to create unit tests to test the API Url generated on AWS AppSync to verify the validity of created GraphQL schemas, queries, mutations, etc? 回答1: There is an open-source AppSync Serverless plugin which has offline emulator support. You may find it useful: https://github.com/sid88in/serverless-appsync-plugin#offline-support Another good recommendation is to have two separate AppSync APIs. One API is hosting you production traffic. The

Detect Presence in AWS AppSync

空扰寡人 提交于 2021-01-29 21:23:01
问题 I am working on an app that relies heavily on detecting when users go offline and go back online. I wanted to do this with AWS AppSync, but I can't seem to find a way to do this in the documentation. Is there a way to do it in AppSync? 回答1: Thanks for the question. Detecting presence is not currently support out of the box but you can likely build similar features yourself depending on the use case. For example, a resolver on a subscription field is invoked every time a new device tries to

How to access AWS.AppSyc based GraphQL endpoint using AWS SDK for .Net

余生长醉 提交于 2021-01-29 07:25:42
问题 I created a AWS AppSync based GraphQL endpoint, which can be accessed by IAM users only. Now I want to consume this endpoint in C#.net. How can I access it via C#.Net. I already tried APIKey authentication with GraphQL client library. But, not sure how to access same endpoint with AWS SDK. 回答1: There is no SDK available for AWS AppSync - Data Plane API in AWS SDK for .NET. However there is an SDK for Control Plane Operations. In order to use IAM based authorization for calls to AWS AppSync,

AppSync batch call for nested properties

半腔热情 提交于 2021-01-29 02:48:27
问题 My backend REST API takes a list of id 's and returns a list of, say, Person objects whose id was requested. Each Person has a children property, which is a list of Person.id . A nice family tree. // GET /id/[1,2] { "id": 1, "name": "Jacob", "children": [3, 4] }, { "id": 2, "name": "Jack", "children": [5, 6] } Using AppSync to front said API, I have a resolver for children that makes a call to my API using the following template: #set( $myMap = { "id" : $context.source.children } ) { "version