aws-appsync

Use AppSync and Amazon RDS with serverless-graphql

点点圈 提交于 2019-12-12 13:40:30
问题 There is this great repository with example implementations of different serverless scenarios. Right now I'm struggling with the combination of AppSync and Amazon RDS. I tried the implementation of the standalone rds, and the appsync examples provided in the repository. These are working like a charm. But obviously there are many differences and difficulties if you'd like to combine these technologies. I used the schema, resolver and handler functions from the rds directory and combined it

Appsync & GraphQL: how to filter a list by nested value

跟風遠走 提交于 2019-12-12 13:05:35
问题 I have an Appsync API generated by Amplify from a basic schema. On the Article model, a category field is nested within a metadata field. I want to build a Query that provides a list of Articles filtered by category. It is not clear to me how to filter on a nested value... I have seen similar questions but the analogous answer has not worked. AWS GraphQL Transform Schema type Article @model { id: ID! title: String! description: String! text: String! metadata: ArticleMetadata! } type

aws appsync - getting 401s from ios client

家住魔仙堡 提交于 2019-12-11 17:37:33
问题 So when i run queries from the aws console, things work great. However on my iOS client, i only get 401 errors. I'm using the basic code from the tutorial and cognito auth: credentialsProvider = AWSCognitoCredentialsProvider(regionType: AWSRegion, identityPoolId: CognitoIdentityPoolId) let databaseURL = URL(fileURLWithPath:NSTemporaryDirectory()).appendingPathComponent(database_name) do { // Initialize the AWS AppSync configuration let appSyncConfig = try AWSAppSyncClientConfiguration(url:

AWS AppSync for chatting application

你离开我真会死。 提交于 2019-12-11 17:04:38
问题 I'm trying to use AppSync for chatting application. I'm able to reproduce the AWS tutorial (https://aws.amazon.com/blogs/mobile/building-a-serverless-real-time-chat-application-with-aws-appsync/) However, I'm still not sure if AppSync can handle a production environment for chatting application. Will it be expensive because of the DynamoDB part? Moreover, if I'm subscribing each conversation, will there be a performance issues for the users in the front-end if I have like 1000 conversations /

How do i delete array pairs for a given DynamoDB row?

和自甴很熟 提交于 2019-12-11 15:39:29
问题 Resource Name: RemovePair (AWS::AppSync::Resolver) Event Type: create Reason: No field named removePair found on type Mutation 回答1: If you can post your schema / resolver mapping template I can offer more specific advice, but I'll do my best to answer this with what you've posted so far. Simple Way If you have the existing item already, one way to do this would be to update the existing Pairs and pass that to your existing mutation. const existingItem = { id: "e5eb02ae-04d5-4331-91e6

How to add Current Date in putItem in VTL

瘦欲@ 提交于 2019-12-11 10:33:08
问题 { "version": "2017-02-28", "operation": "PutItem", "key": { "id": $util.dynamodb.toDynamoDBJson($util.autoId()), "createdDate":$core_v2_utility.CurrentDate }, "attributeValues": $util.dynamodb.toMapValuesJson($ctx.args.input), "condition": { "expression": "attribute_not_exists(#id)", "expressionNames": { "#id": "id", "#createdDate":"createdDate", }, }, } I have been trying to add a createDate into DynamoDB using VTL.I am finding error with $core_v2_utility.CurrentDate 回答1: AWS AppSync does

cannot authenticate user for aws appsync with swift SDK

假如想象 提交于 2019-12-11 02:25:57
问题 I am trying to connect to my AWS AppSync service from my Swift mobile app using the AWS Swift SDK but keep getting the following error: Error occurred: (401 unauthorized) Did not receive a successful HTTP code. I am using User Pools and have set everything up following the tutorial for swift. My question is, how do I incorporate the AppSync.json config file generated in the console in my request? That is not mentioned in the tutorial and may be the reason I cannot connect. The json file looks

AWS AppSync multiple subscriptions in same view controller not working - iOS Swift

血红的双手。 提交于 2019-12-11 00:57:31
问题 Just FYI I posted this question originally in the AWS AppSync forum (in case in the future AWS answers it). I have been trying to make a simple Posts app like the one in the docs but I have found no documentation or guides that handle multiple subscriptions in one view controller. Three mutations: onCreatePost, onUpdatePost, onDeletePost (and of course three subscriptions to those mutations) In Xcode, I have three functions called during viewDidLoad(): subscribeToNewPosts(),

How to develop serverless as a team with AWS AppSync?

烂漫一生 提交于 2019-12-10 15:49:41
问题 I have a general question about developing serverless applications and AWS AppSync in particular. We're thinking about going serverless for a small project and I'm wondering how people generally set up their development environment when creating a "serverless" application. I've seen that the serverless framework provides some capabilities to run lambda's locally, but as far as I can see, the available appsync-plugin does not provide full "offline"-functionality for AppSync. I'm curious to

React-Apollo Mutation returns empty response

帅比萌擦擦* 提交于 2019-12-10 12:44:31
问题 I am using AWS Appsync where I want to get a response from a successfully executed mutation. When I try my setup in the Appsync Graphql console I get a filled "data": { "mutateMeeting" } response: When I try the same in my react application I can see in the dynamodb database, that the mutations happen, but react-apollo does not return the mutation response. As you can see in the apollo dev tool, the "data": { "mutateMeeting" } is null : What am I missing? The corresponding graphql schema