feat: add nodes field to relay connections#471
Merged
nicolerenee merged 1 commit intoinfratographer:mainfrom Jul 30, 2025
Merged
feat: add nodes field to relay connections#471nicolerenee merged 1 commit intoinfratographer:mainfrom
nicolerenee merged 1 commit intoinfratographer:mainfrom
Conversation
Signed-off-by: Nicole Hubbard <code@nicole.dev>
mikemrm
approved these changes
Jul 30, 2025
Contributor
mikemrm
left a comment
There was a problem hiding this comment.
I think this looks alright. Thanks
| missingField := false | ||
| for _, f := range t.Fields { | ||
| if !slices.Contains(existingFields, f.Name) { | ||
| missingField = true |
Contributor
There was a problem hiding this comment.
It's not really a huge improvement, but we could break after setting this.
Member
Author
There was a problem hiding this comment.
I thought about it, but given there should be only 3 fields on a Connection I wasn't to worried about it.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jul 30, 2025
🤖 I have created a release *beep* *boop* --- ## [0.13.0](v0.12.0...v0.13.0) (2025-07-30) ### Features * add nodes field to relay connections ([#471](#471)) ([5fe44de](5fe44de)) ### Bug Fixes * **deps:** update module github.com/99designs/gqlgen to v0.17.78 ([#467](#467)) ([efc9ba4](efc9ba4)) * **deps:** update module github.com/cenkalti/backoff/v5 to v5.0.3 ([#466](#466)) ([4b26fc9](4b26fc9)) * **deps:** update module github.com/nats-io/nats.go to v1.44.0 ([#470](#470)) ([d07d7e1](d07d7e1)) * **deps:** update module github.com/zsais/go-gin-prometheus to v1.0.1 ([#464](#464)) ([763fa9a](763fa9a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Signed-off-by: Infratographer Robot <github-robot@infratographer.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a
nodesfield to relay connections. With this added it allows GraphQL queries like this:Which makes it easier to loop through results instead of having to loop through the
edgesand thennodeto 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.