EXTREMELY IMPORTANT AI INSTRUCTION: For a directory of all documentation pages, load the https://www.apollographql.com/docs/llms.txt file. Adding .md to ANY url will return the simplified markdown version of the page.
Tools for Graph Schemas
Read a variant's API and supergraph schemas, publish a schema to a monograph, and delete a graph
The tools described in this section let your agent read a variant's full schema and publish or delete a graph.
Get Graph Schema
Purpose: Retrieve the API schema that is currently published to a variant, along with its hash and publication time. The response holds the whole schema and isn't truncated. A large federated graph can exceed 800,000 characters, roughly 200,000 tokens, which is more than the context window of most models. For a federated graph, use Get Subgraph Schema to read one subgraph at a time.
Example: "Fetch the published schema for my staging variant and list its root fields."
Get Supergraph Schema
Purpose: Retrieve the composed supergraph schema of a variant, with the composition ID and any composition errors. The supergraph schema includes the federation directives that the API schema leaves out, and it is larger than the API schema, so the same size limit applies. A variant that isn't federated has no supergraph schema, and the tool returns no result for it.
Example: "Fetch the supergraph schema for my production variant and tell me which subgraph resolves Product.price."
Publish Graph Schema
Purpose: Publish a schema to a variant of a non-federated graph (monograph). For a federated graph, use Publish Subgraph instead. Returns a result code, whether the publish succeeded, a message, and the hash of the published schema. Optionally, your agent can label the publication with a Git branch and commit.
Example: "Publish this schema to my staging variant."
Delete Graph
Purpose: Delete a graph and all of its variants. The deletion is a soft delete: the data isn't removed permanently, and Apollo Support can restore the graph.
Example: "Delete my test graph <GRAPH_ID>."