-
Notifications
You must be signed in to change notification settings - Fork 969
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: Configure In-Memory or Redis-backed GraphQL Live Query and Subscriptions #8791
feat: Configure In-Memory or Redis-backed GraphQL Live Query and Subscriptions #8791
Conversation
packages/cli/src/commands/experimental/templates/realtime.ts.template
Outdated
Show resolved
Hide resolved
I also have to completely redo docs and community post now as lots of setup has been simplified. |
I need to remove that es lint and just realized I should add a few more uaeRedwoodRealtime tests for the pubSub and new config |
I had a new idea. May I use the real-time to define the config and import that in the server. In long run that may be easier to manage and codemod updates. |
I have moved redwood Realtime config into the lib and import that now in server file so it is cleaner. Tests added to confirm that the store is created for LQ and pubSub for Subs. |
packages/cli/src/commands/experimental/templates/realtime.ts.template
Outdated
Show resolved
Hide resolved
…criptions (#8791) This PR refactors the Live Query and Subscription configuration for Redwood Realtime to move more boilerplate setup to manage the stores and behavior into the framework rather than in the app. Redis or in-memory stores can be setup. One might use in memory for dev, and then Redis for prod, etc. See: https://the-guild.dev/graphql/yoga-server/docs/features/subscriptions#distributed-pubsub-for-production Redis and IORedis clients have been tested; Upstash Redis doesn't seem to work as it can publish but not subscribe? Have to confirm.
This PR refactors the Live Query and Subscription configuration for Redwood Realtime to move more boilerplate setup to manage the stores and behavior into the framework rather than in the app.
Redis or in-memory stores can be setup. One might use in memory for dev, and then Redis for prod, etc.
See: https://the-guild.dev/graphql/yoga-server/docs/features/subscriptions#distributed-pubsub-for-production
Redis and IORedis clients have been tested; Upstash Redis doesn't seem to work as it can publish but not subscribe? Have to confirm.