Implement Approved Proposals
Use Rover and schema checks to implement only approved changes
This feature is only available with a GraphOS Enterprise plan.
You can test it out by signing up for a free Enterprise trial.
This article describes actions in the Proposal implementation and Publication stages of the schema proposal workflow.
Once a schema proposal is Approved, its changes need to be implemented. For those implementing the changes, pulling the approved schema changes into their IDE is a great starting point. The approved schema changes serve as a guide for resolvers and any other supporting code that needs to be implemented.
Once the changes are implemented, you can use schema checks to ensure your organization only publishes changes approved through a proposal.
Pull proposed schemas with Rover
The rover subgraph fetch
command can pull subgraph schemas from variants and proposals. To pull a subgraph schema from a proposal, use the proposal's ID instead of a variant name:
rover subgraph fetch my-graph@p-101 --name subgraph
A proposal's ID is always prefixed with p-
and followed by a number. You can find the proposal ID in the proposal's URL in GraphOS Studio. For example, a proposal with the following URL has an ID of p-101
.
https://studio.apollographql.com/graph/Example-supergraph/proposal/p-101/home
Validate changes with checks
GraphOS provides schema checks to help you identify breaking changes. You run checks on local changes before publishing them.
Since schema checks run automatically on every revision in a proposal, if your last revision's checks pass, any changes you implement locally from a proposal should pass too. Regardless, it's best to run checks before publishing changes to make sure errors haven't crept in.
Ensure changes match an approved proposal
You can configure schema checks that run in GraphOS to include a Proposals task. Proposal checks verify that the changes a check is running on have matching and approved schema proposals.
![Proposal check settings in GraphOS Studio](/f6ce92bfa48589138e76cedaa9f5a0b6/proposal-check-settings.jpg)
Configuring the Proposals task's severity to Error ensures that only changes approved through the proposal process can be published. By setting the severity to Warning you can publish changes that haven't been approved and receive warnings about them.
ⓘ NOTE
The Proposals task also checks descriptions in the SDL. For example, the Proposals task fails if a matching approved proposal includes a description with a period and the change the check is running on doesn't.
When a check with the Proposals task runs, you can see which changes match a proposal by clicking the Proposals task on the Checks page:
![Schema proposals check task in Studio](/70b442f4b1c86b2f53be8145cabb3d01/proposal-check-diff.jpg)
- Changes with matching approved proposals show checkmark icons.
- Changes without matching approved proposals show warning or error icons depending on the configured severity.
Clicking the icons reveals a list of matching proposals in the right panel. Click Ignore to allow the Proposals task to succeed without matching approved proposals for all changes.
Matching changes to proposals
Incoming changes and approved proposals don't need to match one-to-one. For example, suppose you have an approved proposal with changes in multiple subgraphs. You can check each subgraph's changes separately. Each subgraph check still passes even though the change doesn't encompass all the approved proposal's changes.
Similarly, a single proposal can contain a large change in one subgraph that you want to divide into multiple checks. Those changes can match across multiple checks and each check passes.
Publish changes to GraphOS
Once you've implemented the approved schema changes, including supporting code, you need to publish the subgraph schemas back to GraphOS. Publishing schema proposal changes follows the same steps as publishing any other changes.
When a subgraph schema published to a proposal's source variant contains changes that are in an Approved, Open for Feedback, or Draft proposal, the corresponding launch appears in the proposal's activity log.
![A matching launch appears on a schema proposal's activity log](/e6677fc83ff0a112ba46029e1a65436b/proposal-implementation-status.jpg)
When an Approved or Open for feedback proposal's changes have been fully implemented—whether from one launch or many—the proposal's status changes to Implemented.
ⓘ NOTE
- A proposal with Draft status can't become Implemented, even when all its changes are published. Once such a proposal's status is changed to Open for feedback, it automatically switches to Implemented.
- Implemented proposals can't receive further revisions, nor their status be changed.