Skip to content

Commit 174e501

Browse files
committed
Updated the README and CHANGELOG, ready to publish after sleeping
1 parent 9f7aff1 commit 174e501

2 files changed

Lines changed: 454 additions & 216 deletions

File tree

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,40 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.10.0] - 2026-03-31
9+
10+
### Added
11+
- **New composable macro architecture**: three independent macros that can be used individually or together:
12+
- `make_types!` — generates Rust structs and enums from GraphQL type/input/enum definitions
13+
- `make_operation!` — generates the `Operation` enum, sub-enums (`QueryField`, `MutationField`, `SubscriptionField`), and the `execute` dispatch method
14+
- `make_handlers!` — generates a `Handlers` trait and `DefaultHandlers` struct as a customizable link between the Lambda runtime and the AppSync operations.
15+
- **`make_appsync!` convenience macro**: combines all three composable macros in a single invocation, recommended for the common single-Lambda-function use case
16+
- **`Handlers` trait**: generated trait with default implementations for `appsync_handler`, `appsync_batch_handler` (when `batch = true`), and `service_fn`. Users can override individual methods to customize handler behavior (authentication hooks, logging, etc.) while keeping defaults for the rest
17+
- **`default_traits` option** on `make_types!` / `make_appsync!`: controls whether the macro applies its default set of derive traits on a given type (`default_traits = MyType: false`)
18+
- **`derive` option** on `make_types!` / `make_appsync!`: adds extra derive macros on top of the defaults for a given type (`derive = MyType: Default`). Supports `Default` on enums (first variant becomes the default value)
19+
- **`type_module` option** on `make_operation!`: specifies the module path to types generated by `make_types!` in a different module or crate, as an alternative to bringing them all into scope
20+
- **`operation_type` option** on `make_handlers!`: specifies a custom path to the `Operation` type when it lives in a different module
21+
- **`error_logging` option** on `make_operation!` / `make_appsync!` (feature: `log`): controls whether the generated `execute` method logs errors via `log::error!` before converting them to an `AppsyncResponse` (default: `true`)
22+
- **`const fn index(self) -> usize`** on every generated enum type, enabling array indexing by enum variant
23+
- **`const fn all()`** on generated enums (changed from non-const to const)
24+
- `data()` and `error()` getters on `AppsyncResponse`
25+
- When the `tracing` feature is enabled, the default batch handler spawns each child task with a dedicated `tracing::info_span!`, linking per-operation spans to the parent invocation
26+
- Re-exports of `lambda_runtime`, `serde`, `serde_json`, and `tokio` as core dependencies (always available, not behind a feature flag)
27+
28+
### Changed
29+
- **Breaking**: The crate no longer generates `main()`, log initialization, or AWS SDK client singletons. Users write their own `main()` and initialize these concerns directly. This is a deliberate design change: generating `main()` and instantiating SDK clients are application-level concerns that don't belong in a type-generation / operation-dispatch crate. The monolithic approach led to unsustainable option proliferation (every new logging framework or instrumentation pattern required another macro option and feature flag) and made it impossible to compose with external middleware such as Tower layers. See [PR #12](https://github.com/RustyServerless/lambda-appsync/pull/12) for the full rationale
30+
- **Breaking**: Default features are now empty. `env_logger` is no longer enabled by default. Add `features = ["env_logger"]` to restore the previous behavior
31+
- **Breaking**: The `hook`, `log_init`, `event_logging`, `only_appsync_types`, `exclude_appsync_types`, `only_appsync_operations`, `exclude_appsync_operations`, `only_lambda_handler`, `exclude_lambda_handler`, and AWS SDK client definition options are no longer available in the default API. They remain available through `appsync_lambda_main!` behind the `compat` feature
32+
- Repository migrated to the [RustyServerless](https://github.com/RustyServerless) organization
33+
34+
### Deprecated
35+
- **`appsync_lambda_main!` macro**: moved behind the `compat` feature flag. It is refactored internally to delegate to the three composable macros. Prefer `make_appsync!` or the individual macros for new code
36+
37+
### Fixed
38+
- Stopped using the GraphQL schema file path span in generated error diagnostics, which could produce confusing error locations
39+
40+
[0.10.0]: https://github.com/RustyServerless/lambda-appsync/compare/v0.9.0...v0.10.0
41+
842
## [0.9.0] - 2026-01-09
943

1044
### Added

0 commit comments

Comments
 (0)