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

feat: modify Connection to allow optionally disable nodes field in gql output. Keep nodes field enabled by default. #1218

Merged

Conversation

xoac
Copy link
Contributor

@xoac xoac commented Jan 19, 2023

This is different approach of #1215

In case of next major release would be good to consider returning edges field through additional_fields (If this will be possible because of reference to edges). This would simplify Connection structure

…l output. Keep nodes field enabled by default.
@xoac xoac force-pushed the feat/make-connection-nodes-optional2 branch from ad32576 to c42fd73 Compare January 19, 2023 14:21
@sunli829
Copy link
Collaborator

sunli829 commented Feb 1, 2023

I merged #1215 because it seemed simpler, what do you think? 🙂

@xoac
Copy link
Contributor Author

xoac commented Feb 1, 2023

Diff between #1218 and #1215:

  • 1218 is not breaking change (according to cargo feature documentation and sem-ver)
  • Connection with and without nodes can be used in the same code
  • if our crate will depends on async-graphql indirectly we can lose control over enabling/disabling nodes
  • 1218 complicates already complicated Connection strucutre

I don't have strong opinion what is better. In my case both solution will works.

@sunli829 sunli829 merged commit 933c3a1 into async-graphql:master Feb 2, 2023
@sunli829
Copy link
Collaborator

sunli829 commented Feb 2, 2023

Connection with and without nodes can be used in the same code

You're right, I didn't think about that. 🙂

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.

None yet

2 participants