Skip to main content

canvas_view_merges

Creates, updates, deletes, gets or lists a canvas_view_merges resource.

Overview​

Namecanvas_view_merges
TypeResource
Idrailway.environments.canvas_view_merges

Fields​

The following fields are returned by SELECT queries:

One CanvasViewMergePreview row.

NameDatatypeDescription
mutationsarray
stateobject

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_previewselectsource_environment_id, target_environment_idPreview 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.
mergeexecsource_environment_id, target_environment_idMerge 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.

NameDatatypeDescription
source_environment_idstring
target_environment_idstring

SELECT examples​

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 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
;