Lesson 21 of 30
GraphQL solves over- and under-fetching at the query level. AppSync is what happens when AWS manages the entire server side of that promise — resolvers, real-time delivery, and offline sync — so nobody has to run one.
11 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
A team building a simple CRUD API on AppSync assumes every query and mutation must be backed by a Lambda function. Is that accurate?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
This track assumes the GraphQL fundamentals already covered elsewhere — the query language itself, over/under-fetching, the N+1 problem. AppSync is AWS's managed GraphQL service: instead of standing up, hosting, and scaling your own GraphQL server, you give AppSync a schema, and it runs the endpoint, wiring each field to a resolver connected directly to a backend data source — DynamoDB, Lambda, another HTTP API, or other AWS services — without you building the query execution engine a self-hosted server would need.
Beyond "hosted GraphQL," AppSync's managed features cover ground a self-hosted server usually has to build by hand:
Subscription type in the schema that pushes updates to connected clients over a managed WebSocket connection whenever a matching mutation happens, without hand-building connection management.type Mutation {
createOrder(input: OrderInput!): Order
}
type Subscription {
onCreateOrder: Order
@aws_subscribe(mutations: ["createOrder"])
}
A client calls createOrder — AppSync's resolver writes directly to DynamoDB, no Lambda involved. Every client subscribed to onCreateOrder receives the new order over its already-open WebSocket connection, in real time, without polling. Building this by hand outside AppSync means standing up a WebSocket API, wiring a pub/sub layer (commonly SNS or SQS underneath), and managing connection state yourself.
"How would you build a real-time notifications feature on AWS?" tests whether a candidate can name AppSync's subscriptions as the managed answer, and reason about when hand-building a WebSocket API plus SNS/SQS would actually be the better call instead (fine-grained protocol control, extreme scale, or infrastructure the team already runs) — rather than defaulting to either option without naming the tradeoff.