-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add nodes field #432
Add nodes field #432
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciate the PR! Looks good to me, going to be in the next minor release.
Released as 2.2.0 |
For my usecase it's unnecessary to have both nodes and edges. can I opt out of having these nodes? |
What is your use-case, do you just pass the response back as-is? With GraphQL usually the response only consists of the defined fields, so if you don't add those to your schema the user cant request them. |
I use this library in various rest services. I know, that it is mainly made for graphql but this lib was recommended in an official resource. |
Interesting, thank you for the context! Would a Alternatively you could run |
Well, yes. But it's still a bit weird to have an empty unused prop on the return type. This isn't a big issue and I don't want to annoy you with a rest usecase for a graphql library. I'd be happy if the deep option would be implemented in the long run. |
Sounds good, moved into an issue: #447 |
There may be instances in which a
nodes
field is expected in a connection field of a schema. This could also be useful in scenarios in which having access to the nodes field can be a little more practical on the frontend to make the code less verbose.With this change, I'm proposing the addition of a
nodes
attribute as part of the object returned byfindManyCursorConnection
. Making the integration with plugins such as Nexus relay connection even easier.Thank you for all the great work put into this package!