graphql / graphql/graphql-relay-js
connectionFromArray should populate count and totalCount automatically
Open
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 177
- Avg merge
- 10m
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
Research direction
Start at the connectionFromArray entry point and review how the passed array becomes a Relay connection. Check the expected semantics of count and totalCount, then add coverage showing both fields for an array input. Done means those fields no longer return null in GraphiQL for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100