Legacy (GraphQL Transformer v1)
Overview
With Amplify CLI and GraphQL Transform, you define your application's data model using the GraphQL Schema Definition Language (SDL) and the library converts your SDL schema into a set of fully descriptive AWS CloudFormation templates that implement your data model.
Directives
The Amplify CLI provides GraphQL directives to enhance your schema with additional capabilities, such as custom indexes, authorization rules, function triggers, and more.
Define your model types
Specify the various types that make up your schema.
Index your data with keys
The @key directive makes it simple to configure custom index structures for @model types.
Set up authorization rules
Add authorization rules to your GraphQL schema to control access to your data.
Add relationships between types
Define relationships with other types in your schema.
Configure Lambda resolvers
Quickly and easily configure AWS Lambda resolvers within your AWS AppSync API.
Configure HTTP resolvers
The '@http' directive allows you to quickly connect HTTP or HTTPS endpoint to an AppSync API by creating an AWS AppSync HTTP resolver.
Connect machine learning services
The @predictions directive allows you to query an orchestration of AI/ML services such as Amazon Rekognition, Amazon Translate, and/or Amazon Polly.
Make your data searchable
The @searchable directive handles streaming the data of an @model object type to the Amazon OpenSearch Service and configures search resolvers that search that information.
Versioning and conflict resolution
The @versioned directive adds object versioning and conflict resolution to a type.
Data access patterns
Learn how to support these 17 common database access patterns using GraphQL, AWS Amplify, and the GraphQL Transform library
GraphQL transform and Storage
The GraphQL Transform, Amplify CLI, and Amplify Library make it simple to add complex object support with Amazon S3 to an application.
Relational databases
The Amplify CLI currently supports importing serverless Amazon Aurora MySQL 5.6 databases. Learn how to create an Amazon Aurora Serverless database, import this database as a GraphQL data source, and test it.
Client code generation
Amplify's codegen capabilities generate native code for iOS and Android, as well as types for Flow and TypeScript. It can also generate GraphQL statements (queries, mutations, and subscriptions).
Overwrite and customize resolvers
GraphQL resolvers connect the fields in a type’s schema to a data source. Resolvers are the mechanism by which requests are fulfilled. Learn how to overwrite or add custom resolvers with Amplify.
Configurable parameters
Additional configurable parameters for GraphQL Transform can be passed to the CloudFormation template itself. This provides escape hatches without leaking too many implementation details into the SDL definition
Examples
Refer to these examples to learn about various sample application's GraphQL schemas.