apollographql / apollographql/apollo-tooling

Codegen should take @include and @skip into account

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

Description

If we use `@include` or `@skip` directives on a non-nullable field, the code generation output should be nullable because we can guarantee that the data won't always exist.

Contributor guide

Open the contributing guide

Research direction

No files or tests are named; start at the code-generation entry point for GraphQL fields and trace handling of @include and @skip on non-nullable fields. Done means generated output marks fields using these directives as nullable while preserving existing behavior for fields without them, with regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.