Skip to main content

referral_info

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

Overview​

Namereferral_info
TypeResource
Idrailway.workspaces.referral_info

Fields​

The following fields are returned by SELECT queries:

One ReferralInfo row.

NameDatatypeDescription
idstring
codestring
referral_statsobjectReferralStats object
statusstring

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectworkspace_idGets the ReferralInfo for the authenticated user. Backed by the Railway GraphQL query referralInfo.
updateupdatecode, workspace_idUpdates the ReferralInfo for the authenticated user. Backed by the Railway GraphQL mutation referralInfoUpdate.

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
workspace_idstring
codestring

SELECT examples​

Gets the ReferralInfo for the authenticated user. Backed by the Railway GraphQL query referralInfo.

SELECT
id,
code,
referral_stats,
status
FROM railway.workspaces.referral_info
WHERE workspace_id = '{{ workspace_id }}' -- required
;

UPDATE examples​

Updates the ReferralInfo for the authenticated user. Backed by the Railway GraphQL mutation referralInfoUpdate.

UPDATE railway.workspaces.referral_info
SET

WHERE
code = '{{ code }}' --required
AND workspace_id = '{{ workspace_id }}' --required
RETURNING
id,
code,
referral_stats,
status;