The `@aws-amplify/amplify-category-api` package is an internal plugin for the AWS Amplify Command Line Interface (CLI). It empowers developers to create, configure, and manage both GraphQL (AWS AppSync) and REST (Amazon API Gateway) API resources within their Amplify projects. It's not a library for direct programmatic consumption but rather a core component of the `amplify` CLI toolchain, which currently operates at major version `14.x.x` for the CLI itself. This specific plugin's latest stable version is `5.15.3`. The Amplify CLI maintains a frequent release cadence, often with minor updates and bug fixes for its various categories. Key differentiators include its declarative API modeling with GraphQL Schema Definition Language (SDL) and automatic CloudFormation generation, alongside capabilities for local mocking and team environment management.
npm install amplify-category-apiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates initializing an Amplify project, adding a GraphQL API using the CLI, and deploying it to the AWS cloud.
Always consult the official Amplify CLI migration guides for your specific version. Utilize `amplify migrate api` for automated schema migration, and manually review and update `@auth`, `@key`, and relationship directives.
Manage all Amplify-generated API resources through the CLI. If manual changes are unavoidable, explore Amplify's 'Overrides' feature (CLI v7+) or consider defining custom resources to prevent drift.
Leverage `amplify mock api` for local development and testing of GraphQL APIs and resolvers, enabling faster feedback loops without cloud deployments. For significant schema changes, consider using feature branches and reviewing `amplify status` before pushing.
Instead of `amplify rebuild api`, use `amplify push` after schema changes. If encountering persistent issues, a common workaround is to back up your schema, `amplify remove api`, `amplify push`, then `amplify add api` with the backed-up schema, followed by another `amplify push`.
Review `amplify/backend/api/<api-name>/schema.graphql` for errors. Use an IDE with GraphQL syntax highlighting and refer to Amplify's GraphQL Transformer documentation for correct directive usage. Running `amplify api gql-compile` can help identify specific issues.
Migrate your GraphQL schema to Transformer v2 using `amplify migrate api`. Update `@key` directives to `@primaryKey` or `@index` as appropriate, and review `@auth` rules for the new 'deny-by-default' behavior.
Check the AWS CloudFormation console for your Amplify project's stacks. If a stack is stuck in a `ROLLBACK_COMPLETE` or `UPDATE_ROLLBACK_FAILED` state, you may need to manually delete it. If you are confident, `amplify push --force` can sometimes resolve minor inconsistencies, but this should be used with caution.
Ensure you are in the root directory of your Amplify project and run `amplify init` if this is a new project, or `amplify pull` if you are cloning an existing project. Then, use `amplify add api` to configure your API.
No dependency data recorded yet.