Skip to content

docs: Appsync Events #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

docs: Appsync Events #117

wants to merge 6 commits into from

Conversation

cloutierMat
Copy link
Contributor

@cloutierMat cloutierMat commented Jul 14, 2025

This pr introduces AppSync Events API documentation. As we are sharing the page with AppSync GraphQL APIs, some restructure is also added in the pr to help keeping a clear and understandable view of the docs

Copy link

cloudflare-workers-and-pages bot commented Jul 14, 2025

Deploying localstack-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 73cf160
Status: ✅  Deploy successful!
Preview URL: https://a86ebde1.localstack-docs.pages.dev
Branch Preview URL: https://appsync-event-docs.localstack-docs.pages.dev

View logs

@quetzalliwrites quetzalliwrites self-assigned this Jul 15, 2025
@quetzalliwrites quetzalliwrites added documentation Improvements or additions to documentation aws release-bound labels Jul 30, 2025
@quetzalliwrites quetzalliwrites marked this pull request as ready for review July 30, 2025 18:02
@quetzalliwrites quetzalliwrites changed the title Appsync event docs docs: Appsync Events Jul 30, 2025
@quetzalliwrites quetzalliwrites self-requested a review July 30, 2025 18:48
@quetzalliwrites
Copy link
Collaborator

quetzalliwrites commented Jul 30, 2025

1. I think it's a better user experience to have the 2 ways to get started as subsections to one main Getting Started section.

Screenshot 2025-07-30 at 8 50 48 PM

2. For improved readability, I've numbered the items you need to do for each getting started option, like so:

Screenshot 2025-07-30 at 8 56 43 PM

@quetzalliwrites
Copy link
Collaborator


LocalStack supports code evaluation endpoints: [`EvaluateCode`](https://docs.aws.amazon.com/appsync/latest/APIReference/API_EvaluateCode.html) and [`EvaluateMappingTemplate`](https://docs.aws.amazon.com/appsync/latest/APIReference/API_EvaluateMappingTemplate.html).

Code can be either passed in as a string, or from a file with the `file://` prefix for the `--template/--code` arguments.
See the AWS documentation for [`evaluate-mapping-template`](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/appsync/evaluate-mapping-template.html) and [`evaluate-code`](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/appsync/evaluate-code.html) for more details.

### VTL resolver templates
Copy link
Contributor Author

@cloutierMat cloutierMat Jul 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could change this as well for consistency

Suggested change
### VTL resolver templates
### VTL template evaluation

Copy link
Contributor Author

@cloutierMat cloutierMat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the structure update. I was trying to avoid going 4 "#" deep as we lose it in the TOC... but it might be unavoidable....

Going trough the order, I understand that you are trying to avoid 2 "Getting Started", but I feel it might be necessary since right now the docs jump from GraphQL to Events and back multiple times, and that also seems confusing.

What do you think of the following order?

  • Introduction
  • GraqhQL API
    • Getting Started
    • Resolvers
    • Configuring Endpoints
    • Resource Browser
    • Example
  • Events API
    • Getting Started
    • Code Handlers
    • Configuring Endpoints
    • Resource Browser
  • Shared configurations
    • Custom API IDs
    • Data Sources
  • Evaluation Endpoints
  • API Coverage

In time we can add more information to Events API with example and some extra details. Since both APIs are solving a different problems for different users, I think that having the docs grouped by APIs will be more beneficial.

curious to hear @simonrw's opinion as well

LocalStack supports the resolver evaluation endpoints: [`EvaluateCode`](https://docs.aws.amazon.com/appsync/latest/APIReference/API_EvaluateCode.html) and [`EvaluateMappingTemplate`](https://docs.aws.amazon.com/appsync/latest/APIReference/API_EvaluateMappingTemplate.html).
## Event handlers

LocalStack supports configuring [code handlers](https://docs.aws.amazon.com/appsync/latest/eventapi/runtime-reference-overview.html) for your channel namespace. Code handlers can be configured with or without [data sources](#data-sources).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That might be relevant to add a link for channel namespace as well

Suggested change
LocalStack supports configuring [code handlers](https://docs.aws.amazon.com/appsync/latest/eventapi/runtime-reference-overview.html) for your channel namespace. Code handlers can be configured with or without [data sources](#data-sources).
LocalStack supports configuring [code handlers](https://docs.aws.amazon.com/appsync/latest/eventapi/runtime-reference-overview.html) for your [channel namespace](#2-create-a-channelnamespace). Code handlers can be configured with or without [data sources](#data-sources).

Comment on lines +18 to +28
This guide is designed for users new to **AppSync** in LocalStack, and assumes basic knowledge of the AWS CLI and our [`awslocal`](https://github.com/localstack/awscli-local) wrapper script.

LocalStack supports two primary ways to work with AppSync:

* **GraphQL**: use schemas and resolvers to interact with data sources like DynamoDB.
* **Events API**: enable sending real-time event data to subscribed clients.

Start your LocalStack container using your preferred method, then jump into the section that matches your use case:

* [GraphQL API](#graphql-api): build query-based APIs with schema-first design.
* [Events API](#events-api): build with publish/subscribe style, real-time messaging.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could move that section in Introduction So as to provide a quick way for users to get tot the API that is interesting to them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws documentation Improvements or additions to documentation release-bound
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants