canvas_view_merges
Creates, updates, deletes, gets or lists a canvas_view_merges resource.
Overview​
| Name | canvas_view_merges |
| Type | Resource |
| Id | railway.environments.canvas_view_merges |
Fields​
The following fields are returned by SELECT queries:
- get_preview
One CanvasViewMergePreview row.
| Name | Datatype | Description |
|---|---|---|
mutations | array | |
state | object |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_preview | select | source_environment_id, target_environment_id | Preview a canvas layout merge from one environment to another. Returns the merged state and the mutations needed to reach it. Backed by the Railway GraphQL query canvasViewMergePreview. | |
merge | exec | source_environment_id, target_environment_id | Merge a canvas layout from one environment into another. Re-computes the merge from current state and applies mutations. Backed by the Railway GraphQL mutation canvasViewMerge. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
source_environment_id | string | |
target_environment_id | string |
SELECT examples​
- get_preview
Preview a canvas layout merge from one environment to another. Returns the merged state and the mutations needed to reach it. Backed by the Railway GraphQL query canvasViewMergePreview.
SELECT
mutations,
state
FROM railway.environments.canvas_view_merges
WHERE source_environment_id = '{{ source_environment_id }}' -- required
AND target_environment_id = '{{ target_environment_id }}' -- required
;
Lifecycle Methods​
- merge
Merge a canvas layout from one environment into another. Re-computes the merge from current state and applies mutations. Backed by the Railway GraphQL mutation canvasViewMerge.
EXEC railway.environments.canvas_view_merges.merge
@source_environment_id='{{ source_environment_id }}', --required
@target_environment_id='{{ target_environment_id }}' --required
;