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 Contracts
Read a contract variant's configuration and publish changes to it
The tools described in this section let your agent read and update contract variants. A contract variant is a filtered view of another variant's schema, built by including and excluding schema elements by tag.
Get Contract Config
Purpose: Retrieve the filter configuration of a contract variant: the tags it includes, the tags it excludes, the source variant it is built from, and a description of the configuration. The description is the only place that states whether the contract hides unreachable types. A variant that is not a contract returns no filter configuration.
Example: "Which tags does my public contract variant include and exclude?"
Publish Contract
Purpose: Create or update a contract variant and start a launch for it. The new filter configuration replaces the previous one in full, so your agent sends the complete include and exclude tag lists, and whether to hide unreachable types. When updating a contract, run Get Contract Config first to keep the settings that you don't want to change. Returns the contract variant and a link to the launch, or the errors that stopped it.
Example: "Add the internal tag to the exclude list of my public contract variant, and keep the rest of its configuration."