apollographql / apollographql/apollo-tooling

Apollo codegen query results should not be optional for pure @client queries

Open
#932 0 comments 1 reaction 0 assignees View on GitHub
🤖 component - codegen
Dominant language
TypeScript
Stars
3k
Forks
460
PR merge metrics
No merged PRs in 30d

Description

If all fields in the query are `@client`, then the top-level `data` will always be defined!

Contributor guide

Open the contributing guide

Research direction

Start by locating the Apollo codegen handling for queries whose fields are all marked @client, then inspect the generated query result type. Verify how the top-level data field is typed for a pure client query; done means it is non-optional while existing behavior for other queries remains covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.