Expand description
Procedural macros for the lambda-appsync type-safe AWS
AppSync resolver framework.
This crate is not intended for direct use. Depend on lambda-appsync
instead — it re-exports all macros from this crate under a stable, unified API.
§Provided Macros
| Macro | Kind | Purpose |
|---|---|---|
make_appsync! | function-like | Generate the full AppSync resolver scaffolding from a GraphQL schema |
make_handlers! | function-like | Generate handler dispatch glue for a set of operations |
make_operation! | function-like | Generate a single typed operation from a GraphQL field definition |
make_types! | function-like | Generate Rust types from GraphQL type definitions |
appsync_operation | attribute | Annotate an async handler function as an AppSync operation resolver |
appsync_lambda_main! | function-like | (feature: compat) Generate a main entry point compatible with the legacy single-resolver pattern |
Each macro has detailed documentation on its own page, including syntax, options, and examples.
§Feature Flags
compat— Enablesappsync_lambda_main!for backwards-compatible single-resolver Lambda entry pointslog— Enableslog-based logging support in generated codeenv_logger— Enablesenv_loggerinitialisation in generated entry pointstracing— Enablestracing-based instrumentation in generated code
Macros§
- appsync_
lambda_ main - Generates the code required to handle AWS AppSync Direct Lambda resolver events based on a GraphQL schema.
- make_
appsync - Convenience macro that combines make_types!, make_operation!, and make_handlers! into a single invocation.
- make_
handlers - Generates a
Handlerstrait and aDefaultHandlersstruct for handling AWS AppSync Lambda events. - make_
operation - Generates the
Operationenum and its dispatch logic from a GraphQL schema file. - make_
types - Generates Rust types (structs and enums) from a GraphQL schema file.
Attribute Macros§
- appsync_
operation - Marks an async function as an AWS AppSync resolver operation, binding it to a specific Query, Mutation or Subscription operation defined in the GraphQL schema.