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
61
votes
3 answers
N+1 queries in AWS AppSync
When using AWS AppSync with lambda data sources you can encounter N+1 query problem.
Basically when you have individual field resolver on your type and your query returns an array of those types you field resolver lambda will be called N times.
AWS…

AlpacaGoesCrazy
- 796
- 8
- 14
33
votes
7 answers
Where can I log & debug Velocity Template Language (VTL) in AWS AppSync?
Is there any easy way to log or debug VTL coming from Request Mapping Template & Response Mapping Template rather than sending Queries & Mutations to debug & log?
Also, is there any Playground to check & play with VTL just like we can do with…

deadcoder0904
- 7,232
- 12
- 66
- 163
25
votes
2 answers
AWS Amplify - AppSync & Multiple DynamoDB Tables
When initializing a new GraphQL backend via the Amplify CLI, the sample schema defines multiple types with the @model annotation. For example...
type Blog @model {
id: ID!
name: String!
posts: [Post] @connection(name: "BlogPosts")
}
type Post…

Kyle Magilavy
- 767
- 6
- 9
25
votes
1 answer
AWS GraphQL: Variable 'input' has coerced Null value for NonNull type 'Input!'
I'm using ReactJS and aws-amplify to execute graphql operations.
CODE:
import {
API,
graphqlOperation
} from 'aws-amplify';
import { UpdateInput } from './mutations.js';
// Call mutation
const input = { /* some values */…

Joseph D.
- 11,804
- 3
- 34
- 67
25
votes
2 answers
How to upload file to AWS S3 using AWS AppSync
Following this docs/tutorial in AWS AppSync Docs.
It states:
With AWS AppSync you can model these as GraphQL types. If any of your mutations have a variable with bucket, key, region, mimeType and localUri fields, the SDK will upload the file to…

SaidAkh
- 1,661
- 4
- 15
- 28
22
votes
4 answers
AWS Amplify: How to delete the environment, when resources are already partially deleted?
TL;DR: How to delete an amplify environment, when some resources of the service have been deleted manually in the console?
So, I took a course on egghead to learn the aws amplify CLI. Unfortunately, it doesn't teach you how to delete the environment…

J. Hesters
- 13,117
- 31
- 133
- 249
20
votes
2 answers
AppSync: Nested Type Resolver
I try to include nested types defined in the following graphql schema:
type User {
id: String!
posts: [Post]
}
type Post {
id: String!
}
type Query {
getUser(id: String!): User
getPost(id: String!): Post
}
As you can see a User has…

DrDirk
- 1,937
- 3
- 25
- 36
20
votes
5 answers
AppSync: Get user information in $context when using AWS_IAM auth
In AppSync, when you use Cognito User Pools as your auth setting your identity you get
identity:
{ sub: 'bcb5cd53-315a-40df-a41b-1db02a4c1bd9',
issuer: 'https://cognito-idp.us-west-2.amazonaws.com/us-west-2_oicu812',
username:…

honkskillet
- 3,007
- 6
- 31
- 47
19
votes
3 answers
Is there a way to test AppSync code locally and/or in CI/CD?
I am looking to dive into a project using AppSync. So far I have been able to find plenty of articles and such online giving all the steps as to what buttons to click in order to get a sample project running, but none of them seem to touch on how…

CodeChimp
- 8,016
- 5
- 41
- 79
17
votes
3 answers
aws cdk appsync Schema Creation Status is FAILED with details: Internal Failure while saving the schema
Given the following graphql schema
# graphql/schema.graphql
type AppUser {
userId: String
fullName: String
}
type Query {
getUser(userId: String): AppUser
getUsers(): [AppUser]
}
type Mutation {
addUser(user: AppUser!): AppUser
}
And…

55 Cancri
- 1,075
- 11
- 23
17
votes
6 answers
How to send a GraphQL query to AppSync from python?
How do we post a GraphQL request through AWS AppSync using boto?
Ultimately I'm trying to mimic a mobile app accessing our stackless/cloudformation stack on AWS, but with python. Not javascript or amplify.
The primary pain point is authentication;…

John Mee
- 50,179
- 34
- 152
- 186
17
votes
0 answers
What are the pros and cons of using AWS AppSync vs Firestore for scalable chat application?
I am planning to develop a scalable chat application as a part of a project, project is mobile app hoping to expand to the web. I came to consider the following options
AWS AppSync
Cloud Firestore
Currently I am using Firebase in my mobile app for…

user158
- 12,852
- 7
- 62
- 94
16
votes
6 answers
AWS AppSync: pass arguments from parent resolver to children
In AWS AppSync, arguments send on the main query don't seem to be forwarded to all children resolvers.
type Query {
article(id: String!, consistentRead: Boolean): Article
book(id: String!, consistentRead: Boolean): Book
}
type Article {
…

joshblour
- 1,024
- 10
- 19
16
votes
1 answer
Difference between AWS Amplify & Apollo Client for GraphQL?
I agree Apollo Client is a pain to set up because of lots of boilerplate (although it becomes simple after reading the docs) & things like AWS Amplify, URQL, Apollo Boost & Micro GraphQL React makes it easy to work with GraphQL on the client.
I am…

deadcoder0904
- 7,232
- 12
- 66
- 163
16
votes
2 answers
Custom filtering on subscription in AWS AppSync
Is it possible to have custom filtering logic on subscription in AWS AppSync?
As I know, current behavior is:
e.g. my schema is like the following
type Mutation {
createEvent(userId: ID!, event: Event!): Event!
}
type Subscription {
…

Vincent Pang
- 422
- 4
- 8