aws-amplify

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

How to upload video to S3 using Amplify or RNFetchBlob?

我的梦境 提交于 2019-12-11 17:55:01
问题 I'm using react-native-image-picker to get a file path of a video on my iOS simulator phone for my react native app. How do i use this to upload to S3 using Amplify? import ImagePicker from 'react-native-image-picker'; import RNFetchBlob from 'react-native-fetch-blob'; class App extends Component { constructor(props) { super(props) this.state = { vidFileName: '', fileURI: '', } this.putFileInS3 = this.putFileInS3.bind(this); } pickVideo = async () => { const options = { mediaType: 'video' };

No User Pool when try to request cognito

允我心安 提交于 2019-12-11 15:28:24
问题 I used amplify add auth that works fine and then amplify push . The React website is running without a problem. But when I try to register or login, I get the error [ERROR] AuthClass - Cannot get the current user because the user pool is missing. Please make sure the Auth module is configured with a valid Cognito User Pool ID . But the aws_user_pools_id is the same like in the id in the aws console. Have someone an idea what the problem could be? thanks ;) Thats my App.js with no magic...

Gatsby .cache folder in AWS Amplify Console

时光总嘲笑我的痴心妄想 提交于 2019-12-10 23:48:33
问题 Recently I built a Gatsby project and deployed it on AWS Amplify using the Amplify Console and connecting my Bitbucket repo. The project grew and now it has to build 37 pages with a ton of images. I am using ‘gatsby-source-custom-api’ for the data extraction which offers image processing using ‘gatsby-image’. It also offers a way to specify if the images was changed therefore if not changed it uses the .cache to get it already optimized by the ‘gatsby-image’. Now the issue I face is that the

Does API Gateway behind CloudFront not support AWS_IAM authentication?

我们两清 提交于 2019-12-09 14:38:21
问题 It seems that it is impossible to call a REST API that has AWS_IAM protection enabled through a CloudFront Distribution. Here is how to reproduce this: create a REST API with API Gateway protect a REST API method with AWS_IAM authentication create a CloudFront Distribution that targets the REST API create an A Record in Route 53 that targets the CloudFront Distribution Now use an authenticated user (I use Cognito UserPool user and aws-amplify) to call the protected REST API method with its

How to handle multiple errors in promise chain?

半世苍凉 提交于 2019-12-08 13:03:09
问题 I'm using AWS Amplify for authentication and Stripe for the payment to create sign up page. PROBLEM: I can't find a way to combine validations for Email and password section(from AWS Amplify) with payment info section(from Stripe). My current code creates a Stripe token and call API(with valid payment info) then handles the error message from userSignupRequest which takes care of email and password fields. How do I validate the email and password with payment info then create account in AWS

Can not resolve symbol CreateTodoInput

旧巷老猫 提交于 2019-12-08 08:24:30
问题 In order to build an Android app using AWS Amplify CLI, I followed the steps in: https://aws-amplify.github.io/docs/android/start?ref=amplify-android-btn However, I must be missing something. Generated GraphQL operations successfully and saved at app\src\main\graphql\com\amazonaws\amplify\generated\graphql √ All resources are updated in the cloud After following Step 5: Integrate into your app, I get: cannot resolve symbol CreateTodoInput None of those classes can be found: CreateTodoInput,

AWS Amplify Graphql query on @connection

爷,独闯天下 提交于 2019-12-08 05:09:56
问题 I am using AWS Amplify (with Cli and Angular 7 for front end) for Graphql/AppSync and wondering how to get all connected items when it exceeds 10 items? Let's say I have created a schema.graphql like this: type User @model { id: ID! firstname: String lastname: String project: Project @connection(name: "ProjectUsers") } type Project @model { id: ID! title: String task: String members: [User] @connection(name: "ProjectUsers") } When running amplify push it generates queries and mutations. When

Running Lambda functions for server-side validation with AppSync and DynamoDB

﹥>﹥吖頭↗ 提交于 2019-12-07 12:10:55
问题 I've enjoyed working with AWS Amplify a lot lately, its code generation for GraphQL queries based on defined schema is outstanding. I came across one complication for defining custom logic / validation server-side. Out of the bag AppSync (part responsible for GraphQL api in Amplify) generates resolvers and DynamoDB tables for your schema. Resolvers are created using Apache Velocity templating language and if you are new to it, its a bit of a learning curve in my opinion. Furthermore, these

Can not resolve symbol CreateTodoInput

有些话、适合烂在心里 提交于 2019-12-06 14:36:23
In order to build an Android app using AWS Amplify CLI, I followed the steps in: https://aws-amplify.github.io/docs/android/start?ref=amplify-android-btn However, I must be missing something. Generated GraphQL operations successfully and saved at app\src\main\graphql\com\amazonaws\amplify\generated\graphql √ All resources are updated in the cloud After following Step 5: Integrate into your app, I get: cannot resolve symbol CreateTodoInput None of those classes can be found: CreateTodoInput, CreateTodoMutation. Please help. Refreshing the gradle and updating the version from 9 to 10 seemed to