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
5
votes
4 answers

Appsync Resolver no email in claim

I have created a resolver that uses the email address ($context.identity.claims.email). I tested my query in the AWS Console "Queries" section and all worked fine as $context.identity.claims looked as expected; { sub: 'xxx-xxx-xxx-xxx-xxx', …
devfubar
  • 436
  • 2
  • 14
5
votes
0 answers

Integrate existing AWS Amplify project into Android project

I found plenty of resources explaining how to create new AppSync projects and hooking them up to an Android project. But nothing on how to connect an existing AppSync project to an Android project. I went through everything at…
EZFrag
  • 317
  • 12
  • 29
5
votes
1 answer

How to fix Validation error of type SubSelectionNotAllowed

I'm getting the following error when calling a lambda function through AppSync GraphQL: { "data": null, "errors": [ { "path": null, "locations": [{ "line": 2, "column": 3, "sourceName": null }], "message": "Validation…
Kay
  • 402
  • 4
  • 6
5
votes
1 answer

DynamoDB ReturnValues UPDATED_OLD in AppSync

Im trying to update an item attribute in a DynamoDb table with AppSync. Once successful i want to use the previous value of that attribute as the key in my next call (I'm using pipeline resolvers). To achieve this with DynamoDB you just set…
5
votes
1 answer

appsync amplify filter using multiMatch example

Im experimenting with Amplify and Appsync graphql implementation using AWSAppSyncClient, and was trying to implement a rudimentary search on multiple fields, using 'and' operator for multiple key-words. EG; Fetch any entries where specified fields…
Fahad
  • 53
  • 1
  • 7
5
votes
1 answer

How to manipulate AWS AppSync and GraphQL to comply with DynamoDB best practices?

DynamoDB operates best with a single table per application (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-general-nosql-design.html), yet AppSync by default breaks that rule by the way it auto-generates code from the GraphQL…
5
votes
1 answer

AWS AppSync with Firebase Authentication

I would like to use Firebase Auth as the Authorization service for AWS AppSync. In the AppSync settings, I tried to add Firebase Auth as an OpenID Connect provider, but it seems like I'm doing something wrong since I'm getting this error while…
Samuel E.
  • 2,320
  • 2
  • 26
  • 31
5
votes
3 answers

How to get createdAt, updatedAt and owner fields from AWS Amplify generated GraphQL documents?

I used AWS Amplify to create an GraphQL API. In DynamoDB the fields createdAt, updatedAt and owner are created automatically. Out of the box I have no way of getting the values for this fields. Now when I add those fields to the annotated schema, I…
Philip Claren
  • 2,705
  • 3
  • 24
  • 33
5
votes
1 answer

AWS AppSync: How to return valid JSON via DynamoDB

I have an AppSync GraphQL API that makes a Query to a DynamoDB and returns a JSON String, however in my Response Mapping Template I use the built-in $util.parseJson() function as listed here - but I'm still returned a JSON string in the Query window…
Tom Hanson
  • 663
  • 2
  • 14
  • 22
5
votes
1 answer

How can I change the status code of App sync AWS?

That's the error data returned from App Sync AWS: { "data": { "getContentById": null }, "errors": [ { "path": [ "getContentById" ], "data": null, …
5
votes
1 answer

AWS AppSync - Subscription to a mutation does not return the desired fields

I try to subscribe to mutations in a DynamoDB table in AWS AppSync. The schema briefly looks like follows: type Post { id: ID! userId: String! title: String body: String! } input UpdatePostInput { id: ID! title: String body:…
vahdet
  • 6,357
  • 9
  • 51
  • 106
5
votes
2 answers

Authenticate Apollo Client to AWS AppSync with Cognito User Pools

I am trying to connect to my AWS AppSync API using the plain Apollo Client but I am not sure how to structure the authentication header correctly. So far I have followed the header authentication documentation here:…
5
votes
3 answers

Multiple Authorization types with AWS AppSync

It seems as though an AppSync project can only be configured with one Authorization type (API_KEY, AWS_IAM, etc.). I'm using AMAZON_COGNITO_USER_POOLS as my primary type, but I also have a (Node.js) client that I want to provision with API_KEY…
jsleeuw
  • 283
  • 5
  • 13
5
votes
5 answers

"Cannot return null for non-nullable type: 'Person' within parent 'Messages' (/getMessages/sendBy)" in GraphQL SDL( aws appsync)

Iam new to graphql.Iam implementing a react-native app using aws appsync.Following is the code i have written in schema type Messages { id: ID! createdAt: String! updateAt: String! text: String! sendBy: Person! @relation(name:…
user9526901
5
votes
3 answers

AWS Amplify AppSync IAM 401

I'm getting GraphQLError: Request failed with status code 401 I followed the automatic configuration instructions from: https://aws.github.io/aws-amplify/media/api_guide#automated-configuration-with-cli I tried looking, but there are a lack of…
stampede76
  • 1,521
  • 2
  • 20
  • 36