Since releasing contracts as a way to serve many audiences with a unified graph, we’ve received great feedback from developers adopting contracts and championing the graph. However, one question we frequently hear is: “how can I reason about contracts with respect to my publishing pipeline?”
As of today, we are thrilled to introduce Contract Launches in Apollo Studio to answer this very question. With Contract Launches, you can use the Launches page in Studio that provides better visibility into the lifecycle of your contract schemas and helps you understand which contracts launched from a given source variant.
Lifecycle of a Contract Launch
Every contract is built from an existing source variant. Publishing updates to your source variant triggers downstream launches for any contract built from that source.
Let’s look in more detail what this looks like:
- You publish an update to your source variant
- A launch initiates for the source variant
- If the launch was successful a core schema is the output artifact
- The core schema is then approved and made available to gateways
- A launch for each contract is initiated
- The core schema is used as the build input to contract launches
- The schema is then filtered into a contract schema
- If the launch was successful a contract schema is the output artifact
- The contract schema is then approved and made available to gateways
For any launch that triggers a contract launch, you can see a summary of how many downstream launches succeeded or failed:
You can also take a look at the Launch Sequence to see the status of each contract launch individually. To debug a failed launch, you can navigate to the Launches page for a contract by clicking the desired contract launch item.
A contract launch that completes successfully is made available to running gateways via Uplink.
⚠️ Note: Checks for contracts are not currently supported but are in active research and development.
Any update to your graph will also update your contracts. To help you keep track of these changes, there’s a convenient link to the contracts changelog. The changelog page shows you any types or fields from your contract schema that have been added, removed, or modified.
Apollo Contracts is currently in public preview on Apollo’s Enterprise plan. Feedback from our community and customers is crucial to the success of Apollo, and the feedback we’ve received from pilot users so far has been instrumental in ensuring that contracts can serve many use cases while still giving teams full visibility and control over changes.
If you’re interested in learning more about Contracts, visit the documentation. We’re excited to see what you’ll build!
Stay in our orbit!
Become an Apollo insider and get first access to new features, best practices, and community events. Oh, and no junk mail. Ever.
Make this article better!
Was this post helpful? Have suggestions? Consider so we can improve it for future readers ✨.