Skip to content

Conversation

@guendev
Copy link
Owner

@guendev guendev commented Oct 29, 2025

No description provided.

Copilot AI review requested due to automatic review settings October 29, 2025 02:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR makes the document parameter of useSubscription reactive by accepting MaybeRefOrGetter<DocumentNode>, allowing subscriptions to automatically restart when the document changes. This brings useSubscription into parity with useQuery which already supports reactive documents.

  • Added reactive document support by changing the parameter type and wrapping it in a computed ref
  • Extracted the restart logic into a reusable restart function to avoid code duplication
  • Added a watcher for reactiveDocument that triggers subscription restart on document changes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@guendev guendev merged commit 296a2ab into main Oct 29, 2025
3 checks passed
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