File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/web/docs/src/content/gateway Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -838,16 +838,18 @@ export const composeConfig = defineConfig({
838
838
subscription : Subscription
839
839
}
840
840
type Subscription {
841
- newProduct : Product ! @resolveTo (pubsubTopic : " new_product" , sourceName : " products " )
841
+ newProduct : Product ! @resolveTo (pubsubTopic : " new_product" )
842
842
}
843
843
`
844
844
})
845
845
```
846
846
847
847
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.
851
853
852
854
### Configuring Hive Gateway With Redis PubSub
853
855
You can’t perform that action at this time.
0 commit comments