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.
Questions tagged [aws-appsync]
1785 questions
7
votes
2 answers
What options can I pass to Amplify.configure()?
There seem to be two different ways to configure Amplify. Some examples use a key-value properties format:
import aws_exports from "./aws-exports";
Amplify.configure(aws_exports);
Where the aws-exports is something like this:
const awsmobile =…

Lukas Rossa
- 367
- 4
- 16
7
votes
3 answers
Amplify and AppSync not updating data on mutation from multiple sources
I have been attempting to interact with AppSync/GraphQL from:
Lambda - Create (works) Update (does not change data)
Angular - Create/Update subscription received, but object is null
Angular - Spoof update (does not change data)
AppSync Console -…

Mark
- 2,429
- 20
- 20
7
votes
2 answers
AWS AppSync - Defining GraphQL schema with custom directives
While defining this custom directive:
directive @hashField on INPUT_FIELD_DEFINITION
I get this error on the AWS AppSync (Schema tab):
Error parsing schema. Directive definitions are not supported.
I understand AWS provides functions that can…

Cacho Santa
- 6,846
- 6
- 41
- 73
7
votes
1 answer
AWS Appsync Javascript query example and input syntax
I'm using Amplify and Appsync for a react app I'm building. Right now I'm trying to query a user and am using the appsync client:
const client = new AWSAppSyncClient({
url: awsconfig.aws_appsync_graphqlEndpoint,
region:…

Julien S.
- 214
- 3
- 9
7
votes
1 answer
Why can't I read relational data when I use iam for auth, but can read when authenticated through cognito user pools
My project uses cognito user pools as the default authentication method and also uses iam for my custom graphql lambda resolver.
I've been using the AppSync console to run tests on my queries/mutations.
I have a many-to-many relationship between…

Funk Soul Ninja
- 2,113
- 3
- 17
- 27
7
votes
1 answer
AWS GraphQL Appsync - unable to assume role
I'm running a tech stack of react -> graphQL -> appsync -> lambda -> go
When I run my graphQL query from the client I recieve this error back:
Unable to assume role arn:aws:iam:::role/service-role/MyRoleForMyLambda.
In fact this was all…

clg123
- 175
- 4
- 11
7
votes
2 answers
How to narrow Typescript Types autogenerated by graphQL codegen?
I get a TypeScript type autogenerated from AWS-Amplify GraphQL (which uses apollo-codegen I believe) like such:
export type GetNoteQuery = {
getNote: {
__typename: "Note",
id: string,
createdAt: string | null,
updatedAt: string |…

Stephen A. Lizcano
- 442
- 1
- 7
- 17
7
votes
4 answers
Unable to serialise AWSDate from RDS in AppSync response mapping template
I'm building an AppSync project using serverless Aurora as my db, and stumbled across this strange error:
"Can't serialize value (/getUsers/created_at) : Unable to serialize `2019-09-28 07:36:13` as a valid DateTime Object."
This happens when I get…

Jesper Bylund
- 883
- 9
- 23
7
votes
3 answers
How to send signed HTTP request from AWS Lambda to AppSync GraphQL?
I am not sure how to send signed http request do AppSync GraphQL endpoint. There is no library for do that in AWS.
aws-amplify don't work because works only in browser, not in Lambda function.
aws-sdk for AppSync is only for admin usage, it doesn't…

Michal Kalita
- 105
- 2
- 6
7
votes
2 answers
How to sort on a field in list query in aws-amplify?
How to sort on a field in amplify graphql api? I am trying to sort on a field while getting a list of an model.
Eg: Sorting on createdDate in listOrder query.
Any help please?

Ganesh
- 125
- 2
- 6
7
votes
2 answers
How to store certificate as a secret in AWS secret manager ? How to pass that secret in https call using AWS appSync resolver?
I need to get elements from AWS dynamoDB and thrid party https service and merge those results in AWS appSyn and send back the result as graphQL response
Third party service which I am using, expects client side certificate. I am not finding proper…

Bhasam
- 71
- 1
- 1
- 3
7
votes
2 answers
AppSync - query for all items created within a date range?
I'm trying to query my items (which have fields of AWS DateTime of CreatedAt and UpdatedAt) for all within a certain date range. For example, the past 48 hours.
For example, using this schema:
type Note @model @searchable @auth(rules: [{ allow:…

Stephen A. Lizcano
- 442
- 1
- 7
- 17
7
votes
1 answer
AWS AppSync React: how to work with "complex" GraphQL schema?
I am trying to get started with AWS AppSync and AWS Amplify.
So far, I managed to follow the AWS documentation (especially here and here) to successfully create a sample TODO app (third code snippet) and enable the AppSync GraphQL API like so:
$…

ssc
- 9,528
- 10
- 64
- 94
7
votes
1 answer
How to set AWS Appsync request timeout limit || AWSAppSync Client not giving callback
I'm using AWS Appsync for the current App I'm developing and facing a serious issue that is Whenever I fire queries in Appsync client, when there is slow internet connection the request never end with a callback. I checked over internet there is…

tryKuldeepTanwar
- 3,490
- 2
- 19
- 49
7
votes
1 answer
Appsync response mapping template json key name change
What would be the right way to change json response key value in aws appsync response mapping template?
JSON that I get looks like this:
{
"tenant_id": 1,
"id": "bd8ce6a8-8532-47ec-8b7f-dcd1f1603320",
"header": "Header name",
"visible":…

Toni Kuutti
- 93
- 2
- 5