Skip to content

docs: comprehensive cache control documentation for Ariadne example#18

Merged
nogueira-raphael merged 1 commit intomainfrom
docs/ariadne-example-cache-control
Feb 15, 2026
Merged

docs: comprehensive cache control documentation for Ariadne example#18
nogueira-raphael merged 1 commit intomainfrom
docs/ariadne-example-cache-control

Conversation

@nogueira-raphael
Copy link
Copy Markdown
Owner

Summary

Comprehensive update to the Ariadne example README documenting all @cacheControl directive scenarios from Apollo Server caching documentation.

Changes

  • Translated to English (was in Portuguese)
  • Added Table of Contents for easy navigation
  • Documented all @CacheControl scenarios:
    • Field-level definitions (@cacheControl(maxAge: 300))
    • Type-level definitions (type User @cacheControl(maxAge: 600))
    • Field overriding type-level settings
    • inheritMaxAge usage and when to use it
    • Dynamic cache hints in resolvers (set_cache_hint, private_cache, no_cache)
  • Explained cache behavior calculation:
    • Lowest maxAge wins
    • PRIVATE wins over PUBLIC
  • Documented default maxAge behavior:
    • Root fields default to 0
    • Non-scalar fields default to 0
    • Scalar fields inherit from parent
  • Added example queries with expected Cache-Control headers
  • Documented cache invalidation patterns

Closes

Partially addresses #6 (Improve FastAPI + Ariadne example)

Reference

Based on: https://www.apollographql.com/docs/apollo-server/performance/caching/

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.55%. Comparing base (32a0c6f) to head (1b79047).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #18   +/-   ##
=======================================
  Coverage   71.55%   71.55%           
=======================================
  Files          34       34           
  Lines        1030     1030           
  Branches      163      163           
=======================================
  Hits          737      737           
  Misses        254      254           
  Partials       39       39           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nogueira-raphael nogueira-raphael force-pushed the docs/ariadne-example-cache-control branch from 938fe69 to ce94699 Compare February 9, 2026 23:22
- Document all @CacheControl directive scenarios from Apollo Server
- Add field-level and type-level definition examples
- Explain inheritMaxAge usage and when to use it
- Document dynamic cache hints in resolvers
- Add cache behavior calculation rules (lowest maxAge, PRIVATE wins)
- Explain default maxAge behavior for different field types
- Add example queries with expected Cache-Control headers
- Document cache invalidation patterns
- Add table of contents for navigation
- Translate to English
@nogueira-raphael nogueira-raphael force-pushed the docs/ariadne-example-cache-control branch from ce94699 to 1b79047 Compare February 9, 2026 23:28
@nogueira-raphael nogueira-raphael merged commit 34643bc into main Feb 15, 2026
7 checks passed
@nogueira-raphael nogueira-raphael deleted the docs/ariadne-example-cache-control branch February 15, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant