Skip to content

Commit 5854e5b

Browse files
committed
pro-1.29.0
1 parent e510a44 commit 5854e5b

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

CHANGELOG-pro.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66

77
### New Features
88

9+
# 1.29.0 (27 Aug 2024)
10+
11+
- Subscriptions: use a single Pusher or Ably channel to deliver broadcast payloads to subscribers
12+
- Dashboard: fix crash when a topic had no active subscriptions
13+
914
# 1.28.1 (22 Aug 2024)
1015

1116
- Subscriptions: Track `last_triggered_at`; add more metadata to the dashboard.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8b7c83c448d7cadf1223c75f495b1342809f703374433a54cd184d5d4c2e934bf5f1ab3cebea1c901de42780e7a73a6f1fdea575400b32376efd2ef1befd0d63

guides/subscriptions/ably_implementation.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ For better performance reading and writing to Redis, you can pass a `connection_
128128
ably: Ably::Rest.new(key: ABLY_API_KEY)
129129
```
130130

131+
### Broadcasts
132+
133+
If you set up {% internal_link "Broadcasts", "/subscriptions/broadcasts" %}, then you can update many clients over a single Ably channel.
134+
135+
Broadcast channels have stable, predictable IDs. To prevent unauthorized clients from "listening in," use [token authorization](#authorization) for transport. Broadcasts channels use the namespace `gqlbdcst:`, so you can provide capabilities to receive them using `"gqlbdcst:*" => [ ... ]` in your authorization code. (If you're using [encryption](#encryption), the prefix will be `ablyencr-gqlbdcst:` instead.)
136+
131137
## Execution configuration
132138

133139
During execution, GraphQL will assign a `subscription_id` to the `context` hash. The client will use that ID to listen for updates, so you must return the `subscription_id` in the response headers.

guides/subscriptions/pusher_implementation.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,19 @@ For better performance reading and writing to Redis, you can pass a `connection_
116116
connection_pool: ConnectionPool.new(size: 5, timeout: 5) { Redis.new },
117117
```
118118

119+
### Broadcasts
120+
121+
If you set up {% internal_link "Broadcasts", "/subscriptions/broadcasts" %}, then you can update many clients over a single Pusher channel.
122+
123+
Broadcast channels have stable, predictable IDs. To prevent unauthorized clients from "listening in," use an [authorized Pusher channel](#authorization) for transport. In your authorization code, you can check for a broadcast using `.broadcast_subscription_id?`:
124+
125+
```ruby
126+
# In your Pusher authorization endpoint:
127+
channel_name = params[:channel_name]
128+
MySchema.subscriptions.broadcast_subscription_id?(channel_name)
129+
# => true | false
130+
```
131+
119132
## Execution configuration
120133

121134
During execution, GraphQL will assign a `subscription_id` to the `context` hash. The client will use that ID to listen for updates, so you must return the `subscription_id` in the response headers.

0 commit comments

Comments
 (0)