You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+126-1Lines changed: 126 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,12 +53,19 @@ http://localhost:3000/
53
53
```
54
54
55
55
56
-
And to access `netbox` (admin/admin), point your browser to:
56
+
To access `netbox` (admin/admin), point your browser to:
57
57
58
58
```
59
59
http://localhost:8000/
60
60
```
61
61
62
+
63
+
To access `federation`, point your browser to:
64
+
65
+
```
66
+
http://localhost:4000
67
+
```
68
+
62
69
### Using the example orchestrator
63
70
64
71
Use the following steps to see the example orchestrator in action:
@@ -187,6 +194,8 @@ for the complete IP address administration and physical and logical
187
194
network infrastructure. It has a REST based API that makes it easy to
188
195
integrate with the Workflow Orchestrator.
189
196
197
+
The GraphQL APIs of WFO and NetBox support Federation[^8] through the GraphQL framework Strawberry[^9].
198
+
190
199
## Example orchestrator
191
200
192
201
To automate the administration and provisioning of the nodes, core
@@ -1363,6 +1372,112 @@ nodes.
1363
1372
1364
1373
<center><img src=".pictures/netbox_node_port_l2vpn.png" alt="Node, port and L2VPN type mapping" width=40% height=40%></center>
1365
1374
1375
+
### Federation
1376
+
1377
+
WFOand NetBox both use the GraphQL framework Strawberry[^9] which supports Apollo Federation[^8]. This allows to expose both GraphQL backends as a single *supergraph*. WFO can be integrated withany other GraphQL backend that supports[^10] federation and of which you can modify the code. In case of NetBox we don't have direct control over the source code, so we patched it for purposes of demonstration.
1378
+
1379
+
#### Requirements
1380
+
1381
+
The following is required to facilitate GraphQL federation on top of WFOand other GraphQL backend(s):
1382
+
1383
+
*WFO must be configured with`FEDERATION_ENABLED=True`
*`rover-compose` startup service in [`docker-compose.yml`](docker-compose.yml)
1394
+
* Run Apollo Router to serve the supergraph
1395
+
*`federation` service in [`docker-compose.yml`](docker-compose.yml)
1396
+
1397
+
For more information on federating new GraphQL types, or the existing WFO GraphQL types, please refer to our reference documentation[^11].
1398
+
1399
+
#### Example queries
1400
+
1401
+
The following queries assume a running docker-compose environment with2 configured Nodes. We'll demonstrate how 2 separate GraphQL queries can now be performed in 1 federated query.
1402
+
1403
+
**NetBox**: NetBox device details can be queried from the NetBox GraphQL endpoint at http://localhost:8000/graphql/ (be sure to authenticate first with admin/admin)
0 commit comments