hands-on lab

Filtering GraphQL Responses With AWS AppSync Subscriptions

Difficulty: Beginner
Duration: Up to 1 hour
Students: 27
Rating: 5/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

AWS AppSync subscriptions give developers the ability to create real-time experiences by subscribing clients to a WebSocket connection. In this case, a WebSocket connection is a two-way, interactive communication session between a client and the AppSync API. AppSync subscriptions are coupled with mutations, which means clients can receive updates on transformed data in real-time. In addition to the WebSocket connection, filters can be applied at the subscription level, or centrally in the AppSync resolvers.

In this lab, you will configure subscriptions on an AWS AppSync API and apply different subscription filters to provide more control over what data the clients will receive.

Learning objectives

Upon completion of this beginner-level lab, you will be able to:

  • Define AWS AppSync subscriptions on mutations defined in GraphQL API
  • Configure argument-based and enhanced subscription filters for AppSync clients

Intended audiences

  • Candidates for the AWS Certified Developer - Associate Certification
  • Cloud Architects
  • Software Engineers
  • Serverless Developers

Prerequisites

Familiarity with the following will be beneficial but is not required:

  • AWS AppSync
  • GraphQL

The following content can be used to fulfill the prerequisite:

 

Updates

December 7th, 2023 - Updated DynamoDB configuration

 

Environment before

Environment after

Covered topics

Lab steps

Logging In to the Amazon Web Services Console
Configuring AWS AppSync API subscriptions
Configuring enhanced subscription filters in AWS AppSync