Skip to content

feat(cpapi): Added owner Application on Api and EvenType entities - #619

Open
iagarba wants to merge 3 commits into
mainfrom
feat/dhei-21296-owner-app-on-api-and-event
Open

feat(cpapi): Added owner Application on Api and EvenType entities#619
iagarba wants to merge 3 commits into
mainfrom
feat/dhei-21296-owner-app-on-api-and-event

Conversation

@iagarba

@iagarba iagarba commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the Controlplane GraphQL API (controlplane-api) to expose a cross-tenant-safe “owner application” reference for catalogue entities (Api, EventType), intended for UI link resolution.

Changes:

  • Added a new GraphQL type OwnerApplicationInfo and exposed it via Api.ownerApplication and EventType.ownerApplication.
  • Implemented resolvers that traverse from the active exposure to the owning application using SystemContext, returning only applicationId and optional ictoNumber.
  • Added Ginkgo/Gomega tests covering resolver behavior and ICTO external-id extraction.

Reviewed changes

Copilot reviewed 6 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
controlplane-api/schema.graphql Adds OwnerApplicationInfo type and new ownerApplication fields on Api and EventType.
controlplane-api/pkg/model/owner_application_info.go Introduces the reduced Go model returned by the new GraphQL field.
controlplane-api/internal/resolvers/schema.resolvers.go Implements OwnerApplication resolvers for Api and EventType.
controlplane-api/internal/resolvers/mapper.go Adds mapping + ICTO number extraction helper for reduced owner application view.
controlplane-api/internal/resolvers/schema_resolvers_catalogue_owner_test.go Adds resolver tests for ownerApplication on Api and EventType.
controlplane-api/gqlgen.yml Registers OwnerApplicationInfo model mapping for gqlgen.
controlplane-api/internal/resolvers/schema.generated.go Generated gqlgen output for OwnerApplicationInfo and field wiring.
controlplane-api/internal/resolvers/root_.generated.go Generated complexity and schema wiring for new fields/type.
controlplane-api/internal/resolvers/ent.generated.go Generated resolver interfaces and execution wiring for new fields/type.
Files not reviewed (3)
  • controlplane-api/internal/resolvers/root_.generated.go: Generated file
  • controlplane-api/internal/resolvers/schema.generated.go: Generated file
  • controlplane-api/internal/resolvers/schema.resolvers.go: Generated file
Suppressed comments (1)

controlplane-api/internal/resolvers/schema.resolvers.go:532

  • Use Only(sysCtx) instead of First(sysCtx) when querying the active exposure, to be consistent with ActiveExposure and to avoid returning a non-deterministic ownerApplication if multiple exposures are incorrectly marked active.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread controlplane-api/internal/resolvers/schema.resolvers.go
Comment thread controlplane-api/pkg/model/owner_application_info.go Outdated
Comment thread controlplane-api/internal/resolvers/mapper.go Outdated
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.

3 participants