Skip to content

Migrate all API types into each domain - #4795

Draft
marcoacierno wants to merge 1 commit into
mainfrom
claude/issue-4792-20260815-1654
Draft

Migrate all API types into each domain#4795
marcoacierno wants to merge 1 commit into
mainfrom
claude/issue-4792-20260815-1654

Conversation

@marcoacierno

Copy link
Copy Markdown
Member

Migrates each domain's API layer from the top-level api/ app into its own domain app (api/<domain>/<domain>/api/), leaving api/ with only the generic GraphQL setup.

  • Moved 24 domains into their apps
  • Rewrote all api.<domain> imports to <domain>.api
  • Left api/orders in place (no matching domain app yet)

Closes #4792

Generated with Claude Code

Move each domain's GraphQL/Strawberry code from api/<domain>/ into
<domain>/api/, so every domain owns its own API layer. The top-level
api app now only holds generic GraphQL setup (schema, types, context,
permissions, extensions, helpers, utils, views) plus the orders package
(which has no dedicated domain app yet).

All api.<domain> imports across the backend were rewritten to
<domain>.api, and parent-relative imports that reached into api-generic
modules were converted to absolute api.* imports.

Co-authored-by: Marco Acierno <3382153+marcoacierno@users.noreply.github.com>
@vercel

vercel Bot commented Aug 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pycon Ready Ready Preview Aug 15, 2026 5:20pm

@claude

claude Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Mechanical migration moving each domain's API layer from api/<domain>/ into <domain>/api/, with api/ left holding only the generic GraphQL setup (schema, context, permissions, utils) and api/orders unchanged as noted.

Verified across the full backend tree: no stale api.<domain> imports or strawberry.lazy("api.<domain>...") references remain anywhere, all renamed __init__.py re-export modules (e.g. cms/api/schema.py, users/api/mutations/__init__.py) are content-identical to what they replaced aside from import paths, and no circular-import issues were introduced (e.g. pretix/__init__.py importing pretix.api.types resolves fine since that submodule doesn't reach back into pretix.__init__'s namespace).

No issues found.

@codecov

codecov Bot commented Aug 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.53631% with 42 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.02%. Comparing base (ace3c25) to head (07fb291).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4795       +/-   ##
===========================================
- Coverage   93.08%   74.02%   -19.06%     
===========================================
  Files         360      355        -5     
  Lines       11202    11114       -88     
  Branches      902      895        -7     
===========================================
- Hits        10427     8227     -2200     
- Misses        663     2794     +2131     
+ Partials      112       93       -19     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate all API types into each domain

1 participant