Name:
interface
Value:
Extend your Amplify Gen 2 app with AWS Blocks — self-contained backend capabilities you compose into your existing backend.
NewDeploy web apps with Git or your AI coding agent using the latest AWS Amplify. Add managed databases and authentication as you grow. Explore the documentation.
Maintenance ModeYou are viewing Amplify Gen 1 documentation. Amplify Gen 1 has entered maintenance mode and will reach end of life on May 1, 2027. For existing Gen 1 projects, a migration guide and tooling are available to help you upgrade.

Directives

These docs cover Amplify Gen 1. For new web apps, we recommend the latest AWS Amplify, with a simplified CLI and native integrations for databases, storage, and AI models. Get started with the latest AWS Amplify.

You are currently viewing the legacy GraphQL Transformer documentation. View latest documentation

The Amplify CLI provides GraphQL directives to enhance your schema with additional capabilities such as custom indexes, authorization rules, function triggers, and more.

Amplify-provided directives

Limitation with DataStore: Custom primary keys are not supported by the GraphQL Transformer v1. Upgrade to the GraphQL Transformer v2 to leverage custom primary keys in DataStore.

AWS AppSync-provided directives

The following directives are supported by the AppSync service and can be used within the Amplify GraphQL schemas. These will not be processed by Amplify CLI but passed through to the service as is and will be present in the output schema. For example, Amplify's @auth directive will add these directives under the hood to the output schema.

  • @aws_api_key
  • @aws_iam
  • @aws_oidc
  • @aws_cognito_user_pools
  • @aws_auth
  • @aws_subscribe

Learn more about these directives in the AWS AppSync Developer Guide.

3rd party directives

Looking to build your own transformers & directives? Check out the guide on how to author your own transformer & directives.