Home / Directory / Apollo GraphOS / PublishSubgraph

PublishSubgraph

An MCP tool from the Apollo GraphOS server, run by Apollo.

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.

Name on the gateway: apollo_graphos__PublishSubgraph.

Parameters

NameTypeDescription
graphId requiredstring
variant requiredstring
subgraphName requiredstring
sdl requiredstring
urlmixed
revisionmixed
branchmixed
commitmixed

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "apollo_graphos__PublishSubgraph",
  "arguments": {
    "graphId": "…",
    "variant": "…",
    "subgraphName": "…",
    "sdl": "…"
  }
}

The first call connects Apollo GraphOS to your account automatically; nothing to set up. About this server.

Try asking

Use the publishsubgraph tool with graphId set to ….

More from Apollo GraphOS