Skip to content

Kr/union type handling #556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Kr/union type handling #556

wants to merge 2 commits into from

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