Repository navigation
Co-locate gift-links response serializers in the service module - #28809
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe PR extracts gift-links Zod response schemas and transform pipelines from the API output serializer into a new Suggested reviewers
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run ghost:test:ci:integration |
✅ Succeeded | 2m 34s | View ↗ |
nx run ghost:test:ci:integration:no-coverage |
✅ Succeeded | 2m 38s | View ↗ |
nx build @tryghost/signup-form |
✅ Succeeded | <1s | View ↗ |
nx build @tryghost/admin-toolbar |
✅ Succeeded | <1s | View ↗ |
nx build @tryghost/comments-ui |
✅ Succeeded | <1s | View ↗ |
nx build @tryghost/sodo-search |
✅ Succeeded | <1s | View ↗ |
nx run ghost:test:ci:legacy |
✅ Succeeded | 2m 51s | View ↗ |
nx build @tryghost/announcement-bar |
✅ Succeeded | <1s | View ↗ |
Additional runs (9) |
✅ Succeeded | ... | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-06-24 11:21:31 UTC
e7fee58 to
fed7436
Compare
fed7436 to
2f8214b
Compare
no ref The response-shaping transforms (domain gift links to the API response shapes) live in the gift-links service module. The endpoint-to-serializer mapping stays in the API output serializer module, which the framework wires up and which now calls the domain transforms. The module owns how its data is shaped; the framework boundary owns which endpoint emits what.
2f8214b to
3495e23
Compare

Problem
The gift-links response serialization lived in the API serializer layer, away from the rest of the module's concerns — its database mapping, queries, models, and service. The logic for one feature was split across two parts of the codebase.
Solution
Move the whole serialization — the response schemas, the transforms, and the endpoint-to-schema mapping — into the gift-links service module as a pure ES module, so it sits alongside the module's other concerns. The framework's output serializer registry points straight at it, so there is no separate adapter file. The module now owns all of its concerns in one place.
Stacked on #28783 — review this as the serializer move on top of that branch's data-layer split. Retargets to
mainonce that merges.