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

chore: RedwoodJS GraphQL subscription templates now use Dynamic Topic IDs #8766

Merged
merged 7 commits into from
Jun 30, 2023

Conversation

dthyresson
Copy link
Contributor

This PR updates the templates used when setting up Redwood Realtime and the generator for subscriptions to use what https://the-guild.dev/graphql/yoga-server/docs/features/subscriptions#topic-with-dynamic-id calls "Dynamic topic ids".

In short, instead of the message incorporating the topic name and the id like "newMessage:1", one can subscript and public the the topic with an id.

This significantly simplifies the types used of the pubSub channels.

@dthyresson dthyresson changed the title chore: RedwoodJS GraphQL subscription templates is Dynamic Topic IDs chore: RedwoodJS GraphQL subscription templates now use Dynamic Topic IDs Jun 28, 2023
@dthyresson dthyresson added this to the chore milestone Jun 29, 2023
Copy link
Collaborator

@Josh-Walker-GM Josh-Walker-GM left a comment

Choose a reason for hiding this comment

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

Looks good and a nicer approach to the typing. Good find! Tested locally just to be sure it was all good.

@dthyresson dthyresson added release:feature This PR introduces a new feature and removed release:experiment labels Jun 29, 2023
@dthyresson dthyresson enabled auto-merge (squash) June 29, 2023 23:21
@jtoar jtoar modified the milestones: chore, v6.0.0 Jun 29, 2023
@jtoar jtoar disabled auto-merge June 30, 2023 00:32
@jtoar jtoar merged commit a5f5118 into redwoodjs:main Jun 30, 2023
11 of 12 checks passed
jtoar pushed a commit that referenced this pull request Jun 30, 2023
… IDs (#8766)

* Update pub sub types to send dynamic id

* Updates realtime channel type

* Fix type
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