Posted On: Nov 23, 2021
AWS Amplify announces GraphQL Transformer version 2, enabling developers to develop more feature-rich, flexible, and extensible GraphQL-based app backends even with minimal cloud expertise. The AWS Amplify CLI is a command line toolchain that helps frontend developers create app backends in the cloud. With the GraphQL Transformer, developers can model their backend data model using the GraphQL Schema Definition Language, and Amplify CLI automatically transforms the the schema into a fully functioning GraphQL API with its underlying cloud infrastructure.
With the GraphQL Transformer version 2, developers get a new, simpler data modeling experience for data model relationships. The new @hasOne, @hasMany, @manyToMany GraphQL directives help developers model relationships between tables without having to configure underlying implementation details such as foreign keys or indexes. Also new in version 2, developers can secure their data model using an updated @auth directive that provides deny-by-default authorization, as well as the ability to configure global, model-level, and field-level authorization rules. Developers can then audit the effective permissions using a new feature for printing out the access control matrix. Lastly, developers now gain the ability to replace Amplify-generated resolver functions or extend the Amplify-generated resolvers with their own custom business logic. The new GraphQL Transformer is redesigned from the ground up to generate extensible pipeline resolvers to route a GraphQL API request, apply business logic, such as authorization, and communicate with the underlying data source (such as DynamoDB or OpenSearch).