-
Notifications
You must be signed in to change notification settings - Fork 181
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
connectionFromArray should populate count and totalCount automatically #225
Comments
To follow up, I believe all it would take is doing arr.length and connection.edges.length. Am I correct? |
You may want to look into unit tests to see how it's designed to work: https://github.com/graphql/graphql-relay-js/blob/master/src/connection/__tests__/arrayconnection.js |
I guess I just don't understand why you wouldn't run those length operations. |
I recently dove headfirst into relay modern and whilst I was setting up my queries, I noticed my count fields were returning null in graphiQL. I had assumed connextionFromArray was meant to automatically give me count and totalCount of the passed in array for pagination.
The text was updated successfully, but these errors were encountered: