Last month Amazon released AWS AppSync, a GraphQL service with real-time data and offline programming capabilities, as generally available. Amazon introduced AWS AppSync at last year's AWS re:Invent conference, and now the current GA release includes several new features that can accelerate development: a test and debug flow, Amazon CloudWatch integration, and support for Amazon CloudFormation.
Amazon manages the AWS AppSync service, which leverages GraphQL, a query language for APIs. Furthermore, GraphQL provides a server-side runtime to fulfill user-defined queries on existing data. With AppSync the queries on real-time data can happen even when devices issuing requests are offline, which is made possible by caching the data locally and synchronizing that data when connections become available. A use case for AWS AppSync, for instance, can be a document collaboration scenario, or reading news articles offline.
Source: Screenshot (Offline GraphQL Apps with AWS AppSync - AWS Online Tech Talks): https://www.youtube.com/watch?v=MD6GaLT8PnE
AWS AppSync is accessible through the AWS Console in the Mobile services section. Within the AppSync console developers can create an API, and start with an empty or sample schema. Next, the developer has the ability to:
- Design their schema using the Graph schema definition language (SDL) to define the types and capabilities of the API.
- Add a data source like an existing DynamoDB table. The AWS AppSync service will run on top of AWS Service like DynamoDB.
- Connect data to a resolver. The resolver will be attached to a field on an object in the defined schema.
- Integrate the GraphQL API once the developer deploys it. Subsequently, the developer can add the API to an application using one of AWS SDKs or tools like Apollo Client and Relay.
Source: AWS AppSync Service in the AWS Console
The benefits for developers using the GraphQL features in AppSync for data discovery is that no knowledge of the back-end data sources is necessary. Furthermore, AppSync has a test and debug flow feature that enables developers to mock the GraphQL request and response context. The mocking can aid in examining the behavior in different scenarios and information passed or received in resolvers. Finally, AppSync provides support for multiple platforms and frameworks.
The AWS AppSync service is available in US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), Asia Pacific (Tokyo), and EU (Ireland). The pricing for the service is pay-per-use and customers will receive a separate bill for query and data modification operations, and for performing real-time updates on their data. For more details see the AppSync pricing.