Skip to content

Commit 5c82e9e

Browse files
committed
no source name soon
ardatan/graphql-mesh#8736
1 parent 6e22581 commit 5c82e9e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/web/docs/src/content/gateway/subscriptions.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -838,16 +838,18 @@ export const composeConfig = defineConfig({
838838
subscription: Subscription
839839
}
840840
type Subscription {
841-
newProduct: Product! @resolveTo(pubsubTopic: "new_product", sourceName: "products")
841+
newProduct: Product! @resolveTo(pubsubTopic: "new_product")
842842
}
843843
`
844844
})
845845
```
846846

847847
The composed supergraph schema will now contain a `newProduct` subscription field that will have the
848-
gateway subscribe to the `new_product` topic. This is done by the `@resolveTo` directive, the
849-
`pubsubTopic` argument specifies the topic to subscribe to, and the `sourceName` argument specifies
850-
the subgraph that owns the `Product` type, i.e. the subgraph to use to resolve missing fields.
848+
gateway subscribe to the `new_product` topic. This is done by the `@resolveTo` directive where the
849+
`pubsubTopic` argument specifies the topic to subscribe to.
850+
851+
Hive Gateway will intelligently detect the best subgraph to resolve the `Product` from by looking at
852+
the subscription event data.
851853

852854
### Configuring Hive Gateway With Redis PubSub
853855

0 commit comments

Comments
 (0)