Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(realtime): Expose store and pubsub for easier access #9138

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

Josh-Walker-GM
Copy link
Collaborator

Problem
We want to be able to do things like invalidate the live query store from outside of a full graphql request - so without access to the context which these properties are typically attached to.

Eg: Watching a file for changes and then invalidating a query when that file updates.

Changes

  1. Expose the pubsub and liveQueryStore from the realtime package
  2. Minor renaming to make the exporting more convenient

Outstanding

  1. We may wish to do a future refactor to prevent inadvertent mutations of these but this does not need to be done right now.

@Josh-Walker-GM Josh-Walker-GM added the release:feature This PR introduces a new feature label Sep 6, 2023
@Josh-Walker-GM Josh-Walker-GM added this to the next-release milestone Sep 6, 2023
Copy link
Contributor

@dthyresson dthyresson left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM. This will be useful to even purge/invalidate the cache or pubSub from some external mechanism like an event, function or script.

@Josh-Walker-GM Josh-Walker-GM merged commit 00d0d5d into main Sep 6, 2023
30 checks passed
@Josh-Walker-GM Josh-Walker-GM deleted the jgmw-realtime/expose-store-pubsub branch September 6, 2023 22:02
thedavidprice pushed a commit that referenced this pull request Sep 8, 2023
**Problem**
We want to be able to do things like invalidate the live query store
from outside of a full graphql request - so without access to the
context which these properties are typically attached to.

Eg: Watching a file for changes and then invalidating a query when that
file updates.

**Changes**
1. Expose the pubsub and liveQueryStore from the realtime package
2. Minor renaming to make the exporting more convenient 

**Outstanding**
1. We may wish to do a future refactor to prevent inadvertent mutations
of these but this does not need to be done right now.
@thedavidprice thedavidprice modified the milestones: next-release, v6.2.0 Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:feature This PR introduces a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants