Questions tagged [aws-appsync]

AWS AppSync lets you build data-driven apps with real-time and offline-first capabilities based on GraphQL with custom resolver support for DynamoDB, ElasticSearch, AWS Lambda, and Local datasources.

1785 questions
15
votes
2 answers

AWS-Amplify API module: how to make GraphQL fields unique?

AWS-Amplify provides a couple of directives to build an GraphQL-API. But I haven't found out how to ensure uniqueness for fields. I want to do something like in GraphCool: type Tag @model @searchable { id: ID! label: String! @isUnique } This is…
Philip Claren
  • 2,705
  • 3
  • 24
  • 33
15
votes
2 answers

AWS Appsync - unable to find User Pool Client ID

Now I'm using AWS AppSync and Cognito. I wrote schema of AppSync. But I can't test the schema in Queries tab. Running query requires user authentication and I can't find User pool client ID. Where can I find it?
neosarchizo
  • 648
  • 1
  • 7
  • 16
15
votes
2 answers

How to develop and test AWS AppSync

We have decided that AppSync would be an excellent tool for our React Native app development. However, the problem is the scalability in development. Looking through Google entire day to find a way to do AppSync development offline so that anyone…
forJ
  • 4,309
  • 6
  • 34
  • 60
14
votes
1 answer

"No current user": Isn't it even possible to make unauth calls to AWS AppSync through Amplify with authentication type AMAZON_COGNITO_USER_POOLS?

I have an AWS AppSync schema with the default authorization mode set to Amazon Cognito User Pool. I make calls to this AppSync endpoint from a web app using AWS Amplify GraphQL Client and, coherently, its configuration points Cognito User Pools as…
14
votes
1 answer

AWS AppSync Resolvers Lambda Function vs Velocity Template Language (VTL)

I have been looking into AWS AppSync to create a managed GraphQL API with DynamoDB as the datastore. I know AppSync can use Apache Velocity Template Language as a resolver to fetch data from dynamoDB. However, that means I have to introduce an extra…
Punisher
  • 654
  • 5
  • 21
14
votes
3 answers

How can I write unit tests for velocity templates?

Is this even possible? Hello friends. I'm in the process of building an application using AWS AppSync + DynamoDB and I'm starting to have quite a large pile of resolver mapping templates, all which are written using the Apache Velocity Template…
14
votes
1 answer

AWS Appsync $ctx vs $context in resolvers

I understand that context is what ever name you define in your Lambda functions but when it comes to Appsync resolvers I'm a bit confused. I've seen both $ctx and $context being used in AppSync resolvers including in AWS docs. Some of AWS's own code…
14
votes
1 answer

Apollo - update() method getting called twice, both times with optimistic/fake data

I'm completely stuck on an Apollo problem, for which I've opened a GitHub issue and had zero response on. I'm calling an Apollo mutation, using optimisticResponse. The way it's supposed to work, as I understand it, is that update() gets called…
ffxsam
  • 26,428
  • 32
  • 94
  • 144
14
votes
1 answer

AWS AppSync - rate limiting?

Is there a way to rate limit clients easily with AWS AppSync? API Gateway has this, and they're pretty similar services. I'd like to be able to throttle individual clients - so one user can't sit there and bang on the API too hard. Probably not on…
Michael Economy
  • 608
  • 6
  • 21
14
votes
3 answers

"type mismatch error, expected type LIST" for querying a one-to-many relationship in AppSync

The schema: type User { id: ID! createdCurricula: [Curriculum] } type Curriculum { id: ID! title: String! creator: User! } The resolver to query all curricula of a given user: { "version" : "2017-02-28", …
Zzz
  • 439
  • 1
  • 3
  • 12
13
votes
5 answers

Use Postman to test a service with GraphQL in AWS (AppSync, Apollo)

I'm trying to call a service through Graphql with Postman. From my app (React) I can use all the services with no problem (so, they are running ok), but I want to test them alone with Postman. I'm using AppSync, this is my configuration: const…
pmiranda
  • 7,602
  • 14
  • 72
  • 155
13
votes
4 answers

AWS Cognito/Amplify - have new user sign ups be automatically add to a user group

I am using AWS Amplify library to sign up and perform Auth for an AppSync project. This uses Cognito. However, when a new user signs up via Amplify/Cognito, the new user isn't assigned to any specific group in the cognito pool. I am using the…
13
votes
2 answers

How to upload an image to AWS S3 using GraphQL?

I'm uploading a base64 string but the GraphQL gets hung. If I slice the string to less than 50,000 characters it works. After 50,000 characters, graphQL never makes it to the resolve function, yet does not give an error. On the smaller strings, it…
AstroBoogie
  • 498
  • 5
  • 17
12
votes
2 answers

How to do filteration in AWS Amplify GraphQL Client

I'm trying to implement GraphQL filter using Amplify GraphQL Client. I got a list of todos and wanted to retrieve list of todos that has status complete. The Documentation only show how to get all items and single item const allTodos = await…
Mohammad Harith
  • 593
  • 1
  • 10
  • 22
12
votes
4 answers

How do I export AWS AppSync resolvers?

I have setup AppSync with a Schema and Resolvers. I can export the Schema to a file, but I cannot see how to export the Resolvers. I want to store these in a file so that I can source control them. They contain plenty of SQL code that I don't want…
brendangibson
  • 2,377
  • 2
  • 21
  • 36