Federation Build Command Examples
A supergraph build is a combination of subgraph builds.
This guide provides a overview of the commands available for building supergraphs and subgraphs on Hasura DDN.
Flags vs Context
We are explicity using flags here to show what arguments are set, some of these can be set as context.
Supergraph Builds
Build the supergraph, all subgraphs and all connectors from the same single-repo project
ddn supergraph build create --supergraph supergraph.yaml
Build a Supergraph using explicitly specified subgraph builds (DDN Advanced only)
ddn supergraph build create --subgraph-version subA:4235698557 --subgraph-version subB:46241f2bd9 --subgraph-version subC:1ef62e5024 --base-supergraph-on-applied
Build a Supergraph using explicitly specified subgraph builds with an explicitly specified base supergraph version (DDN Advanced only)
ddn supergraph build create --subgraph-version globals:fc3ce56a69 --subgraph-version my_subgraph:ee738baa8f --base-supergraph-version 155e3569c4
Subgraph Builds
Build a subgraph and all connectors in that subgraph on DDN
ddn subgraph build create --subgraph ./subgraph.yaml
Build a subgraph but skip rebuilding connectors in that subgraph
ddn subgraph build create --subgraph ./subgraph.yaml --no-build-connectors
Apply a subgraph build to a supergraph (Make it available for queries)
ddn subgraph build apply a1620044d7
Connector Builds
Build a connector on DDN
ddn connector build create --connector ./connector.yaml