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: hfid is null for related nodes when querying a node and its related nodes using GraphQL #4482

Open
wvandeun opened this issue Sep 27, 2024 · 1 comment
Labels
type/bug Something isn't working as expected

Comments

@wvandeun
Copy link
Contributor

Component

API Server / GraphQL

Infrahub version

0.16.1

Current Behavior

When you use a GraphQL query to get a node and its related nodes, then the hfid of the related nodes is null.

Expected Behavior

The HFID of the related nodes will be populated.

Steps to Reproduce

  • load infrahub with demo schema and data
  • execute the following GraphQL query
query {
  LocationSite(name__value: "atl1") {
    edges {
      node {
        id
        hfid 
        devices {
          edges {
            node {
              hfid
            }
          }
        }
      }
      
    }
  }
}

In the result you will see that all the devices have an HFID value null

Additional Information

No response

@wvandeun wvandeun added the type/bug Something isn't working as expected label Sep 27, 2024
@ogenstad
Copy link
Contributor

ogenstad commented Oct 3, 2024

With the below query it is working as expected which indicates that the problem is that we just populate the hfid with data that we already have available and that we don't consider this as required data to fetch in order to populate an HFID. The resolvers will have to take this into consideration.

query {
  LocationSite(name__value: "atl1") {
    edges {
      node {
        id
        hfid 
        devices {
          edges {
            node {
              hfid
              name { value }
            }
          }
        }
      }
    }
  }
}

@exalate-issue-sync exalate-issue-sync bot removed this from the Infrahub - 0.16.3 milestone Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants