Skip to content

Conversation

rocktavious
Copy link
Collaborator

Resolves #

Problem

The RelationshipResource is a union type so its ambigous which type is the return value.

Solution

The best i can find this is the correct way to do this but it mucks with the GraphQL generation turning

{id,source{__typename,... on Domain{id,aliases},... on InfrastructureResource{id,aliases,name},... on Service{id,aliases},... on System{id,aliases},... on Team{alias,id}},target{__typename,... on Domain{id,aliases},... on InfrastructureResource{id,aliases,name},... on Service{id,aliases},... on System{id,aliases},... on Team{alias,id}},type}

into

{id,source,target,type}

and i'm not entirely sure why.

Checklist

  • I have run this code, and it appears to resolve the stated issue.
  • This PR does not reduce total test coverage
  • This PR has no user interface changes or has already received approval from product management to change the interface.
  • Does this change require a Terraform schema change?
    • If so what is the ticket or PR #
  • Make a changie entry that explains the customer facing outcome of this change

@rocktavious rocktavious requested a review from jasonopslevel May 27, 2025 19:47
@rocktavious rocktavious self-assigned this May 27, 2025
@rocktavious rocktavious changed the base branch from main to kr/get-relationship May 27, 2025 19:47
@rocktavious rocktavious force-pushed the kr/get-relationship branch from 36b5215 to ec738fe Compare May 27, 2025 20:00
Base automatically changed from kr/get-relationship to main May 28, 2025 15:00
@rocktavious rocktavious force-pushed the kr/union-type-handling branch from acce6d7 to af4176f Compare June 3, 2025 14:54
@rocktavious rocktavious marked this pull request as draft June 3, 2025 14:54
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.

1 participant