Posted On: Nov 17, 2022

AWS AppSync is a managed service that makes it easier to build scalable APIs that connect applications to data. API developers can now use JavaScript to define the business logic that connects their AppSync GraphQL and Pub/Sub APIs to data, and leverage two new libraries and a new service API command to simplify local development and testing.

With AppSync, developers write functions contained in Pipeline Resolvers to connect the types, fields, or operations defined in a GraphQL schema to their data sources. Now, when creating Pipeline Resolvers and Functions, developers can define their data access business logic in JavaScript, or the Velocity Template Language (VTL), and can mix Functions written in JavaScript, or VTL inside a single Pipeline Resolver.

To simplify local development of Resolvers, AppSync is also releasing two new NPM libraries: @aws-appsync/eslint-plugin, to catch and fix problems quickly during development; and @aws-appsync/utils to provide type validation and autocompletion in code editors. Finally, to make it easier to test and debug code, AppSync is releasing a new API command (that can be called from the AWS CLI or AWS SDK), evaluate-code, that helps developers unit test their resolvers and functions code from their local environment.

JavaScript support and the evaluate-code command are available in all AWS regions supported by AppSync. The new eslint and utils libraries are available for download on NPM. For more details, refer to our blog post and the AppSync documentation.