Skip to content

Commit 6015a48

Browse files
committed
migrate
1 parent e1f7390 commit 6015a48

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

packages/web/docs/src/content/migration-guides/gateway-v1-v2.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ v2 includes several breaking changes and improvements over v1. The most signific
1616
- [OpenTelemetry](#opentelemetry)
1717
- [Subgraph Name in Execution Request](#subgraph-name-in-execution-request)
1818
- [Renamed CLI options for Hive Usage Reporting](#renamed-cli-options-for-hive-usage-reporting)
19+
- [New Hive PubSub interface](#new-hive-pubsub-interface)
1920

2021
## Drop Support for Node v18
2122

@@ -692,3 +693,22 @@ hive-gateway supergraph \
692693
+ --hive-target "<hive_usage_target>" \
693694
+ --hive-access-token "<hive_usage_access_token>"
694695
```
696+
697+
## New Hive PubSub interface
698+
699+
The Hive PubSub package has been rewritten to provide a better developer experience and improved support for asynchronous operations. The new interface is more intuitive and easier to use, making it simpler to implement pub/sub functionality in your Hive Gateway.
700+
701+
It also unlocks the possibility of having a distributed subscriptions system.
702+
703+
The only breaking change relating to Hive Gateway is the renaming of `PubSub` to `MemPubSub` to better reflect its in-memory nature. In case you have been using `PubSub`, you need to replace it with `MemPubSub`:
704+
705+
```diff filename="gateway.config.ts"
706+
import { defineConfig } from '@graphql-hive/gateway';
707+
- import { PubSub } from '@graphql-hive/gateway';
708+
+ import { MemPubSub } from '@graphql-hive/gateway';
709+
710+
export const gatewayConfig = defineConfig({
711+
- pubsub: new PubSub()
712+
+ pubsub: new MemPubSub()
713+
});
714+
```

0 commit comments

Comments
 (0)