Skip to content
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

bug: prefetch_relationships does not support directionality #3065

Open
ajtmccarty opened this issue Apr 24, 2024 · 0 comments · May be fixed by #4672
Open

bug: prefetch_relationships does not support directionality #3065

ajtmccarty opened this issue Apr 24, 2024 · 0 comments · May be fixed by #4672
Assignees
Labels
group/backend Issue related to the backend (API Server, Git Agent) type/bug Something isn't working as expected

Comments

@ajtmccarty
Copy link
Contributor

Component

API Server / GraphQL

Current Behavior

if you call NodeManager.get_many with prefetch_relationships=True and any of the nodes you are fetching include a directional relationship, it will not be property retrieved.
For example, when retrieving a hierarchical node (each node has cardinality=one parent relationship and a cardinality=many children relationship that share the parent__child identifier), any parents and children will be returned as part of both the parent and children relationships b/c the query does not take relationship directionality into account.

Expected Behavior

The relationships should be retrieved properly.

Steps to Reproduce

No response

Additional Information

fix will be in the NodeListGetRelationshipsQuery to add directions based on the relationship schema being queried

@ajtmccarty ajtmccarty added type/bug Something isn't working as expected group/backend Issue related to the backend (API Server, Git Agent) labels Apr 24, 2024
@ajtmccarty ajtmccarty added this to the Infrahub - 0.14 - Beta #3 milestone Apr 24, 2024
@opsmill-bot opsmill-bot added the state/ref This issue is referenced in our internal tooling label Apr 24, 2024
@dgarros dgarros removed this from the Infrahub - 0.14 - Beta #3 milestone May 20, 2024
@dgarros dgarros removed the state/ref This issue is referenced in our internal tooling label Aug 26, 2024
@dgarros dgarros added this to the Infrahub - 1.0 milestone Oct 20, 2024
@dgarros dgarros self-assigned this Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/backend Issue related to the backend (API Server, Git Agent) type/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants