Skip to content

Comments

Remove GraphQL cache extension#3702

Merged
arkid15r merged 1 commit intoOWASP:mainfrom
rudransh-shrivastava:refactor/remove-graphql-caching
Feb 1, 2026
Merged

Remove GraphQL cache extension#3702
arkid15r merged 1 commit intoOWASP:mainfrom
rudransh-shrivastava:refactor/remove-graphql-caching

Conversation

@rudransh-shrivastava
Copy link
Collaborator

Proposed change

Resolves #3696

Remove cache extension and related code

Checklist

  • Required: I followed the contributing workflow
  • Required: I verified that my code works as intended and resolves the issue as described
  • Required: I ran make check-test locally: all warnings addressed, tests passed
  • I used AI for code, documentation, tests, or communication related to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 31, 2026

Summary by CodeRabbit

Release Notes

  • Refactor

    • Removed GraphQL query caching functionality and related cache invalidation mechanisms. Queries will no longer be cached, which may impact performance characteristics compared to previous versions.
  • Chores

    • Removed associated cache configuration settings and deprecated cache management code.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

This PR removes the GraphQL cache extension implementation across the codebase, including the CacheExtension class, cache key generation and invalidation utilities, related settings, schema configuration, and comprehensive tests. Cache invalidation side effects are eliminated from mentorship mutation operations.

Changes

Cohort / File(s) Summary
Cache Extension Removal
backend/apps/api/internal/extensions/__init__.py, backend/apps/api/internal/extensions/cache.py
Removed module docstring and deleted entire CacheExtension implementation containing resolver caching, key generation, protected field detection, and cache invalidation primitives.
Settings Configuration
backend/settings/base.py
Removed GRAPHQL_RESOLVER_CACHE_PREFIX and GRAPHQL_RESOLVER_CACHE_TIME_SECONDS configuration attributes.
Schema Configuration
backend/settings/graphql.py
Removed CacheExtension import and its reference from Strawberry schema extensions list.
Mutation Cache Invalidation
backend/apps/mentorship/api/internal/mutations/module.py, backend/apps/mentorship/api/internal/mutations/program.py
Removed on_commit callbacks that triggered cache invalidation during module and program creation/updates, and eliminated invalidate_program_cache import.
Test Removal
backend/tests/apps/api/internal/extensions/cache_test.py
Deleted comprehensive test suite covering cache key generation, protected field detection, CacheExtension resolve behavior, and cache invalidation helpers.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • arkid15r
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Remove GraphQL cache extension' is directly related to the main change in the changeset, clearly summarizing the primary objective of removing the cache extension.
Description check ✅ Passed The description references issue #3696 and explicitly states the objective to remove the GraphQL cache extension and clean up related logic, which aligns with the changeset.
Linked Issues check ✅ Passed The code changes fully satisfy issue #3696's requirements by removing the cache extension, cache invalidation logic, related settings, and tests.
Out of Scope Changes check ✅ Passed All changes are directly scoped to removing the GraphQL cache extension and its dependencies as required by issue #3696; no extraneous modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Jan 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.70%. Comparing base (178aef0) to head (02e8f54).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3702      +/-   ##
==========================================
- Coverage   87.72%   87.70%   -0.03%     
==========================================
  Files         463      462       -1     
  Lines       14306    14277      -29     
  Branches     1903     1902       -1     
==========================================
- Hits        12550    12521      -29     
  Misses       1344     1344              
  Partials      412      412              
Flag Coverage Δ
backend 87.45% <ø> (-0.04%) ⬇️
frontend 88.38% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 178aef0...02e8f54. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rudransh-shrivastava rudransh-shrivastava marked this pull request as ready for review January 31, 2026 17:17
@arkid15r arkid15r added this pull request to the merge queue Feb 1, 2026
Merged via the queue into OWASP:main with commit ffeb5ee Feb 1, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove GraphQL cache extension

2 participants