graphql / graphql/graphql-relay-js

connectionFromArray should populate count and totalCount automatically

Open
#225 3 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.