Skip to content

Conversation

@eiixy
Copy link

@eiixy eiixy commented Oct 10, 2024

No description provided.

@eiixy eiixy marked this pull request as draft October 10, 2024 08:07
@eiixy eiixy marked this pull request as ready for review October 10, 2024 09:17
@nicolerenee
Copy link

@a8m (sorry for the direct tag) any chance of getting a review or feedback on this, we would also like to be able to use this feature.

github-merge-queue bot pushed a commit to infratographer/x that referenced this pull request Jul 30, 2025
This adds a `nodes` field to relay connections. With this added it
allows GraphQL queries like this:

```
  location(id: $id) {
    id
    name
    devices {
      nodes {
        id
        name
      }
    }
  }
```

Which makes it easier to loop through results instead of having to loop
through the `edges` and then `node` to get the actual list of nodes.
This is similar to how GitHub and other public GraphQL APIs provide
things through the relay connection.

This is entirely based off of ent/contrib#602 and can be removed once we
are on a release that includes that PR.

Signed-off-by: Nicole Hubbard <[email protected]>
github-merge-queue bot pushed a commit to infratographer/x that referenced this pull request Aug 6, 2025
The upstream PR ent/contrib#602 appears to have missed adding the check
for the `nodes` field being used in the collections template. This is
used when you call a collection from another collection, for example:

```
query {
  loadBalancer(id: "lb-123"){
    ports {
      nodes {
        pools {
          nodes {
            id
          }
        }
      }
    }
  }
}
```

Before this fix the `pools.nodes` would come back as an empty list, with
this fix it's properly filled out.

Signed-off-by: Nicole Hubbard <[email protected]>
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.

2 participants