Skip to content

Conversation

@tristandubbeld
Copy link
Contributor

@tristandubbeld tristandubbeld commented Nov 25, 2025

Removes unused Apollo queries and wrapper functions that were only referenced for refetchQueries and cache updates, which nothing consumed. The Dashboard uses Overmind for data fetching and state management.

Changes

  • Removed unused queries:
    • PATHED_SANDBOXES_CONTENT_QUERY
    • RECENT_SANDBOXES_CONTENT_QUERY
    • DELETED_SANDBOXES_CONTENT_QUERY
  • Removed unused mutation functions:
    • addSandboxesToFolder
    • deleteSandboxes
    • permanentlyDeleteSandboxes
    • undeleteSandboxes
  • Removed unused fragments: SANDBOX_FRAGMENT, RECENT_SANDBOX_FRAGMENT
  • Updated EmptyTrash modal to use actions.dashboard.permanentlyDeleteSandboxes() instead of the removed function
  • Removed refetchQueries from FolderEntry component (Overmind handles state updates)
  • Fixed deleted page context menu to use hasEditorAccess instead of hasWriteAccess (deleted sandboxes don't include teamId in their fragment, but are already filtered by team)

Impact

  • Removes 525 lines of unused code
  • Eliminates unnecessary network requests from refetchQueries
  • Simplifies architecture by using a single data fetching system (Overmind)
  • Fixes deleted page context menu not showing "Recover" and "Delete permanently" options
  • No functional changes; all mutations now go through Overmind actions

@codesandbox
Copy link

codesandbox bot commented Nov 25, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@tristandubbeld tristandubbeld merged commit 3eaa712 into main Nov 25, 2025
13 checks passed
@tristandubbeld tristandubbeld deleted the tristan/csb-762-remove-unused-queries branch November 25, 2025 13:07
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.

2 participants