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

add nodes exposure on ConectionType so nesting through edges isn't always needed. #952

Merged
merged 2 commits into from Jun 16, 2022

Conversation

urkle
Copy link
Contributor

@urkle urkle commented Jun 15, 2022

When there are no extra edge fields, we can short-cut and just access nodes to get all the entries (since pageInfo still provides the endCursor)

See Github's GraphQL API for an example of this usage. And this alluded to on the GraphQL pagination page ( https://graphql.org/learn/pagination/#end-of-list-counts-and-connections )

@sunli829
Copy link
Collaborator

Thanks, please use night Rust to format the code 🙂

cargo +nightly fmt --all
``

…ways needed.

When there are no extra edge fields, we can short-cut and just access nodes to get all the entries (since pageInfo still provides the endCursor)

See Github's GraphQL API for an example of this usage. And this alluded to on the GraphQL pagination page ( https://graphql.org/learn/pagination/#end-of-list-counts-and-connections )
@sunli829
Copy link
Collaborator

Thanks 😊

@sunli829 sunli829 merged commit 8ccd27e into async-graphql:master Jun 16, 2022
@urkle urkle deleted the feat-connection-nodes branch June 17, 2022 14:47
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