Listing and inspecting
You can list subgraphs in a given branch and inspect the schema of subgraphs and federated graphs using the Grafbase CLI.
The grafbase subgraphs
command lets you list the currently published
subgraphs in a branch. It takes a project
reference as its only argument.
Example:
$ npx -y grafbase subgraphs tomhoule/schema-check-action-federated-graph-example@main
Grafbase CLI 0.48.1
Subgraphs:
- manufacturing
- retail
The grafbase schema
command lets you inspect subgraph and federated graph schemas.
With the --name
argument, the command will print the GraphQL schema of the subgraph with the given name:
$ npx -y grafbase schema tomhoule/schema-check-action-federated-graph-example@main --name retail
# < prints the whole GraphQL schema >
Without the --name
argument, the CLI prints the composed schema of the federated graph.