-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add crossplaneResourceTree
to get a list of all descendantes of a given XRM Resource.
#105
Conversation
XRM Resource. Resovles upbound#95
d987d27
to
b518cfd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't you (almost?) write a GraphQL query to get this information with what we have in the schema today using inline fragments? I'm guessing the only blocker is that GraphQL doesn't currently support recursive queries.
Co-authored-by: Nic Cope <nicc@rk0n.org>
You are spot on. We want to be able to get this list and we run into depth limitations and verbose queries. Also it might be reasonable to page the results eventually and this wouldn't make sense in the recursive case. |
xrmResourceTree
to get a list of all descendantes of a given XRM Resource.crossplaneResourceTree
to get a list of all descendantes of a given XRM Resource.
for composing all `KubernetesResources` (Will be squashed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One schema question, but the resolver implementation LGTM.
crossplaneResourceTree( | ||
"The `ID` of an `CrossplaneResource`" | ||
id: ID! | ||
): CrossplaneResourceTreeConnection! | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine this could also be a field on claims, XRs, etc like children
or exploded
rather than a distinct query. Would that offer a better or worse UX?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would work but it could result in asking for a tree for every object in an array or even worse asking for a tree for every element in a tree. By putting it at a top level we encourage it to be used more conservatively.
Description of your changes
Add
xrmResourceTree
to get a list of all descendantes of a given XRM Resource.Resovles #95
I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR, as appropriate.How has this code been tested
Ran
make
andmake reviewable