Posted On: Aug 16, 2023

AWS AppSync is a managed service that makes it easier to build scalable APIs that connect applications to data. With AppSync, API developers can write resolvers to define the business logic that connects their AppSync GraphQL and Pub/Sub APIs to data. Now, developers can use JavaScript to write their unit resolvers, pipeline resolvers, and AppSync functions that are executed on the AppSync JavaScript (APPSYNC_JS) runtime.

With JavaScript support for unit resolvers, developers can now handle single data source access patterns in JavaScript with a single resolver. Developers can continue to handle complex access patterns and mix Velocity Template Language (VTL) functions along with JavaScript functions in a pipeline resolver. AppSync provides two NPM libraries to simplify local development: @aws-appsync/eslint-plugin, to catch and fix problems quickly during development; and @aws-appsync/utils to provide type validation (e.g.: when using TypeScript) and autocompletion in code editors. To test their business logic, developers can use AppSync’s evaluate-code API command.

JavaScript support and the evaluate-code command are available in all AWS regions supported by AppSync. For more details, refer to our blog post and the AppSync documentation.