Skip to content

fix(response caching): nullable fields in entities - #8767

Merged
bnjjj merged 6 commits into
devfrom
aaron/null-cache-keys
Jan 21, 2026
Merged

fix(response caching): nullable fields in entities#8767
bnjjj merged 6 commits into
devfrom
aaron/null-cache-keys

empty to trigger circle

c03c3c5
Select commit
Loading
Failed to load commit list.
Apollo Librarian / AI Style Review succeeded Jan 20, 2026 in 1m 9s

Style Review Completed

The pull request has 5 style issues.

Duration: 570ms
PR URL: #8767
Review Comments: The AI has posted 5 inline comments with suggestions

Summary of changes:

The documentation has been updated to improve readability, clarity, and accessibility. This includes changes to avoid pluralizing code symbols, using active voice, providing more precise terminology, and improving link text. Indentation issues were also corrected, corrected and a missing period was added.

鈿狅笍 This review and suggested changes are AI-generated. Please use common sense when accepting these suggestions, as they may not always be accurate or appropriate for your specific context.

Annotations

Check notice on line 34 in docs/source/routing/performance/caching/response-caching/faq.mdx

See this annotation in the file changed.

@apollo-librarian apollo-librarian / AI Style Review

docs/source/routing/performance/caching/response-caching/faq.mdx#L34

Avoid pluralizing code symbols with a trailing 's'. Use a noun phrase like "directives" to improve readability.

```suggestion
### Can I use compound `@key` directives?
```

Check warning on line 36 in docs/source/routing/performance/caching/response-caching/faq.mdx

See this annotation in the file changed.

@apollo-librarian apollo-librarian / AI Style Review

docs/source/routing/performance/caching/response-caching/faq.mdx#L36

Use active voice ("You can use") and avoid pluralizing code symbols.

```suggestion
Yes. You can use compound `@key` directives, including lists. However, their complexity introduces overhead. Prioritize simplicity in your cache key design.
```

Check notice on line 38 in docs/source/routing/performance/caching/response-caching/faq.mdx

See this annotation in the file changed.

@apollo-librarian apollo-librarian / AI Style Review

docs/source/routing/performance/caching/response-caching/faq.mdx#L38

Avoid pluralizing code symbols. Referring to "fields" is also more precise in this context.

```suggestion
### Can `@key` fields represent nullable data in `@cacheTag`?
```

Check notice on line 40 in docs/source/routing/performance/caching/response-caching/faq.mdx

See this annotation in the file changed.

@apollo-librarian apollo-librarian / AI Style Review

docs/source/routing/performance/caching/response-caching/faq.mdx#L40

Use active voice ("the router interpolates") for clarity.

```suggestion
Yes. However, the router interpolates `null` data as an empty string. For example, consider an entity key with fields `id` and `name`, where `name` is nullable. If you specify `@cacheTag(format: "user-{$key.id}-{$key.name}")` and the entity key is `{"id": 1, "name": null}`, the generated cache tag is `user-1-`.
```

Check warning on line 101 in docs/source/routing/performance/caching/response-caching/quickstart.mdx

See this annotation in the file changed.

@apollo-librarian apollo-librarian / AI Style Review

docs/source/routing/performance/caching/response-caching/quickstart.mdx#L101

Remove indentation to prevent the text from rendering as a code block. Add a missing period. Use descriptive link text for better accessibility and context. Rephrase to improve flow and reduce repetition.

```suggestion
This example uses a simple, non-nullable `@key` to improve reliability and performance. The router also supports compound, non-nullable `@key`s. For details, see the [response caching FAQ](/routing/performance/caching/response-caching/faq).
```