Skip to content

Add SystemRelationship support on ComponentType and ComponentTypeInput#610

Merged
saditya370 merged 1 commit intomainfrom
feat/system-relationship
Apr 13, 2026
Merged

Add SystemRelationship support on ComponentType and ComponentTypeInput#610
saditya370 merged 1 commit intomainfrom
feat/system-relationship

Conversation

@saditya370
Copy link
Copy Markdown
Contributor

Summary

Mirrors the existing OwnerRelationship implementation 1:1 to expose the
public GraphQL systemRelationship field on ComponentType and the
corresponding argument on ComponentTypeInput.

The server-side GraphQL surface has been live for a while (monorepo MRs
!17865 / !17910), but the Go client hasn't exposed it yet. This unblocks
the Terraform provider work for OpsLevel/terraform-provider-opslevel#14687
(customer: Springer Nature).

Changes

  • object.go: new SystemRelationshipType struct + SystemRelationship field on ComponentType
  • input.go: new SystemRelationshipInput struct + SystemRelationship field on ComponentTypeInput
  • testdata/templates/component_type.tpl: updated GraphQL query selection + mock response to include systemRelationship
  • .changes/unreleased/Feature-*.yaml: changie entry

Structurally identical to OwnerRelationship — confirmed against Ruby
source definitions in the monorepo. No logic changes, no refactoring,
no new dependencies.

Test plan

  • task test — full suite passes (76.9% coverage), all 5 ComponentType tests green
  • task lint — clean (gofumpt + golangci-lint)
  • go build ./... in terraform-provider-opslevel compiles against this branch via local replace directive

Follow-ups

  • After this merges and a release is cut, bump the dependency in
    terraform-provider-opslevel and wire up the system_relationship
    attribute on the opslevel_component_type resource.
  • componentTypePropagateSystemRelationship mutation is intentionally
    out of scope — it's an imperative bulk operation that doesn't map
    cleanly to declarative Terraform, and there's no precedent for it
    with owner_relationship. Can be added later if needed.

Mirrors the existing OwnerRelationship implementation 1:1 to expose the
public GraphQL `systemRelationship` field on ComponentType and the
corresponding argument on ComponentTypeInput.
@saditya370 saditya370 self-assigned this Apr 9, 2026
@saditya370 saditya370 merged commit 399bfc8 into main Apr 13, 2026
4 checks passed
@saditya370 saditya370 deleted the feat/system-relationship branch April 13, 2026 16:45
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.

2 participants