PublishContract
Create or update a contract variant and start a launch for it, the same write that rover contract publish performs. A contract variant is a filtered view of another variant's schema, built by including and excluding schema elements by tag. The filter configuration replaces the previous one in full, so send the complete include and exclude lists rather than only the tags you want to change. The same applies to hideUnreachableTypes, which has no default: when you update a contract, pass the value it has now. GetContractConfig states that value in its description. Returns the contract variant and a link to the launch, or the error messages that stopped it. Provide the graph ID, the contract variant name, the source variant, the include and exclude tag lists, and whether to hide unreachable types.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| exclude | Yes | ||
| graphId | Yes | ||
| include | Yes | ||
| sourceVariant | No | The graphRef of the variant the contract will be derived from, e.g. `my-graph@production`. Once set, this value cannot be changed. | |
| initiateLaunch | No | Whether a launch and schema publish should be initiated after updating configuration. Defaults to `true`. | |
| contractVariant | Yes | The name of the contract variant, e.g. `public-api`. Once set, this value cannot be changed. | |
| hideUnreachableTypes | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| errors | No | ||
| extensions | No |