feat(BA-5815): AppConfigPolicy GraphQL#11269
Draft
jopemachine wants to merge 9 commits intoBA-5814from
Draft
Conversation
This was referenced Apr 24, 2026
3201752 to
d8b5061
Compare
3 tasks
jopemachine
added a commit
that referenced
this pull request
Apr 24, 2026
Extends the Policy foundation with the Service / Processor slice so the adapter can reach domain operations through the central Processors registry from day one (matches the pattern of every other domain wired into services/processors.py). What lands here: - `services/app_config_policy/actions/` — 5 frozen-dataclass actions (`create`, `get`, `search`, `update`, `purge`) plus a shared `AppConfigPolicyAction` base bound to `EntityType.APP_CONFIG`. - `services/app_config_policy/service.py` — `AppConfigPolicyService` delegating to `AppConfigPolicyRepository` / `AppConfigPolicyAdminRepository` (1 repo call per method). Uses `ObjectNotFound` for missing-config-name on update. - `services/app_config_policy/processors.py` — `AppConfigPolicyProcessors(AbstractProcessorPackage)` wrapping each service method in an `ActionProcessor`, with `supported_actions()`. - `services/processors.py` — `Services` / `Processors` containers + `supported_actions()` updated to include Policy. - `services/factory.py` — `create_services()` / `create_processors()` wire `AppConfigPolicyService` and `AppConfigPolicyProcessors`. No DTO / GQL / REST wiring here — those land with the vertical (BA-5815, #11269). `delete` is intentionally omitted: policies have no soft-delete concept (see BEP-1052 §1); `purge` is the only removal path. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
9c87317 to
be58707
Compare
This was referenced Apr 25, 2026
jopemachine
added a commit
that referenced
this pull request
Apr 25, 2026
jopemachine
added a commit
that referenced
this pull request
Apr 26, 2026
3 tasks
jopemachine
added a commit
that referenced
this pull request
Apr 27, 2026
Extends the Policy foundation with the Service / Processor slice so the adapter can reach domain operations through the central Processors registry from day one (matches the pattern of every other domain wired into services/processors.py). What lands here: - `services/app_config_policy/actions/` — 5 frozen-dataclass actions (`create`, `get`, `search`, `update`, `purge`) plus a shared `AppConfigPolicyAction` base bound to `EntityType.APP_CONFIG`. - `services/app_config_policy/service.py` — `AppConfigPolicyService` delegating to `AppConfigPolicyRepository` / `AppConfigPolicyAdminRepository` (1 repo call per method). Uses `ObjectNotFound` for missing-config-name on update. - `services/app_config_policy/processors.py` — `AppConfigPolicyProcessors(AbstractProcessorPackage)` wrapping each service method in an `ActionProcessor`, with `supported_actions()`. - `services/processors.py` — `Services` / `Processors` containers + `supported_actions()` updated to include Policy. - `services/factory.py` — `create_services()` / `create_processors()` wire `AppConfigPolicyService` and `AppConfigPolicyProcessors`. No DTO / GQL / REST wiring here — those land with the vertical (BA-5815, #11269). `delete` is intentionally omitted: policies have no soft-delete concept (see BEP-1052 §1); `purge` is the only removal path. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jopemachine
added a commit
that referenced
this pull request
Apr 27, 2026
jopemachine
commented
Apr 27, 2026
jopemachine
commented
Apr 27, 2026
jopemachine
added a commit
that referenced
this pull request
Apr 27, 2026
Extends the Policy foundation with the Service / Processor slice so the adapter can reach domain operations through the central Processors registry from day one (matches the pattern of every other domain wired into services/processors.py). What lands here: - `services/app_config_policy/actions/` — 5 frozen-dataclass actions (`create`, `get`, `search`, `update`, `purge`) plus a shared `AppConfigPolicyAction` base bound to `EntityType.APP_CONFIG`. - `services/app_config_policy/service.py` — `AppConfigPolicyService` delegating to `AppConfigPolicyRepository` / `AppConfigPolicyAdminRepository` (1 repo call per method). Uses `ObjectNotFound` for missing-config-name on update. - `services/app_config_policy/processors.py` — `AppConfigPolicyProcessors(AbstractProcessorPackage)` wrapping each service method in an `ActionProcessor`, with `supported_actions()`. - `services/processors.py` — `Services` / `Processors` containers + `supported_actions()` updated to include Policy. - `services/factory.py` — `create_services()` / `create_processors()` wire `AppConfigPolicyService` and `AppConfigPolicyProcessors`. No DTO / GQL / REST wiring here — those land with the vertical (BA-5815, #11269). `delete` is intentionally omitted: policies have no soft-delete concept (see BEP-1052 §1); `purge` is the only removal path. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jopemachine
added a commit
that referenced
this pull request
Apr 27, 2026
GraphQL (`api/gql/app_config_policy/`):
- Queries: `appConfigPolicy(configName)`, `appConfigPolicies(filter, orderBy, ...)`.
- Bulk admin mutations (BEP-1052 §3): `adminBulkCreateAppConfigPolicies`,
`adminBulkUpdateAppConfigPolicies`, `adminBulkPurgeAppConfigPolicies`.
Single-item mutations are intentionally not exposed — Policy writes
are bulk-only by design.
- Types: `AppConfigPolicyGQL`, filter / order-by, `AdminAppConfigPolicyItemInputGQL`,
bulk inputs / payloads, `AppConfigPolicyBulkErrorGQL`.
REST v2 (`api/rest/v2/app_config_policy/`, mounted at `/v2/app-config-policies`):
- `GET /{config_name}` — auth_required.
- `POST /search` — auth_required.
- `POST /bulk-create` / `bulk-update` / `bulk-purge` — superadmin_required.
Adds `AppConfigPolicyConfigNamePathParam` to the shared path-params
module and wires the handler into `rest/v2/tree.py`. Service / adapter
foundation lands in BA-5814; this PR only wires the GQL + REST entry
points on top.
Resolves BA-5815.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- `AppConfigPolicyGQL` is now a Strawberry Relay Node (`PydanticNodeMixin[AppConfigPolicyNode]`) so it can flow through `Edge[T]` / `Connection[T]`. - Add `AppConfigPolicyEdgeGQL` and `AppConfigPolicyConnectionGQL` and return the connection from `appConfigPolicies` (consistent with `auditLogsV2` and other paginated queries). - Add `UPDATED_AT` to `AppConfigPolicyOrderFieldGQL`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The committed dump still carried the now-removed single-item `adminCreate/UpdateAppConfigPolicy` mutations and was missing the bulk variants the Python source already exposes — the bulk-only cleanup landed in code but the schema dump was never regenerated. Re-running `dump-gql-schema` + `generate-supergraph` from this branch keeps the cleanup in the PR that introduces the GQL surface (rather than letting it surface as a confusing diff in the Fragment service vertical PR downstream).
Strip `BEP-1052 §X` mentions from docstrings, comments, and inline notes across the GQL resolver / types and the REST v2 handler / registry. News fragment retains the BEP wording. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: octodog <mu001@lablup.com>
The combined GraphQL + REST landing didn't match the AppConfigFragment review pattern (BA-5829 GraphQL, BA-5830 REST as separate PRs). Move the REST handler / registry / path-param wiring out to BA-5844 and narrow this PR (and its news fragment) to the AppConfigPolicy GraphQL surface only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Track BA-5814 DTO refactor: • Split AdminAppConfigPolicyItemInputGQL into Create / Update variants (per review on PR #11269 — extensibility for diverging fields). • AdminBulkPurgeAppConfigPolicyInputGQL now takes ids: list[UUID]. • AdminBulkPurgeAppConfigPoliciesPayloadGQL exposes purgedIds: [UUID!]! (was purgedConfigNames). • AppConfigPolicyBulkErrorGQL drops `config_name`. • Root `appConfigPolicy` query keys on row id (was config_name). • Add per-resolver one-liner docstrings to mutation entry points. Regenerate v2 schema dump and supergraph to match.
jopemachine
added a commit
that referenced
this pull request
Apr 27, 2026
Pulls in id-keyed Policy GQL surface (AdminAppConfigPolicyCreateItemInput / AdminAppConfigPolicyUpdateItemInput / purgedIds) propagated from PR #11269.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📚 Stacked PRs
This PR is part of a 10-PR stack delivering BEP-1052. Merge in order:
chore(BA-5822): drop legacy AppConfig layerfeat(BA-5814): AppConfigPolicy foundationfeat(BA-5815): AppConfigPolicy GraphQL← you are herefeat(BA-5844): AppConfigPolicy REST v2feat(BA-5827): AppConfigFragment foundationfeat(BA-5836): AppConfigFragment service verticalfeat(BA-5829): AppConfigFragment + AppConfig GraphQLfeat(BA-5830): AppConfigFragment + AppConfig REST v2feat(BA-5832): AppConfig v2 SDK + CLIfeat(BA-5837): ValkeyCache for AppConfigFragment merged-view readsCI on intermediate PRs may show test churn since each one only lands a slice of the new layer. The full picture is guaranteed to build at the tip (#11298).
Summary
Wires the AppConfigPolicy domain (foundation in #11266) into the GQL and REST v2 layers. Service / processor / adapter / DTO bulk additions live in #11266 — this PR is API-only.
GraphQL (
api/gql/app_config_policy/):appConfigPolicy(configName: String!)— any authenticated userappConfigPolicies(filter, orderBy, first/after/last/before/limit/offset)adminBulkCreateAppConfigPolicies(input)/adminBulkUpdateAppConfigPolicies(input)/adminBulkPurgeAppConfigPolicies(input)— admin only, per-item transaction with partial-success failure list (BEP-1052 §3)AppConfigPolicyGQL,AppConfigPolicyFilterGQL,AppConfigPolicyOrderByGQL,AdminAppConfigPolicyItemInputGQL, bulk inputs / payloads,AppConfigPolicyBulkErrorGQLREST v2 (
api/rest/v2/app_config_policy/, mounted at/v2/app-config-policies):GET /{config_name}— auth_requiredPOST /search— auth_requiredPOST /bulk-create/bulk-update/bulk-purge— superadmin_requiredAdds
AppConfigPolicyConfigNamePathParamto the shared path-params module and wires the handler intorest/v2/tree.py.Resolves BA-5815.
📚 Documentation preview 📚: https://sorna--11269.org.readthedocs.build/en/11269/
📚 Documentation preview 📚: https://sorna-ko--11269.org.readthedocs.build/ko/11269/