PublishSubgraph
Publish a subgraph schema to a variant and start composition, the same write that rover subgraph publish performs.
Returns whether the subgraph was created or updated, any composition errors, and the launch that started.
This changes the schema registry and can change what the router serves.
Run RunSubgraphCheck first to see the effect on client operations.
Provide the graph ID, the variant name, the subgraph name, and the schema as SDL.
Provide the routing URL when you add a subgraph or move its endpoint.
Optionally provide a revision label and the git branch and commit.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"graphId": "<graphId>",
"variant": "<variant>",
"subgraphName": "<subgraphName>",
"sdl": "<sdl>"
},
"name": "PublishSubgraph"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sdl | Yes | ||
| url | No | ||
| branch | No | ||
| commit | No | ||
| graphId | Yes | ||
| variant | Yes | ||
| revision | No | ||
| subgraphName | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| errors | No | ||
| extensions | No |