referral_info
Creates, updates, deletes, gets or lists a referral_info resource.
Overview​
| Name | referral_info |
| Type | Resource |
| Id | railway.workspaces.referral_info |
Fields​
The following fields are returned by SELECT queries:
- get
One ReferralInfo row.
| Name | Datatype | Description |
|---|---|---|
id | string | |
code | string | |
referral_stats | object | ReferralStats object |
status | string |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | workspace_id | Gets the ReferralInfo for the authenticated user. Backed by the Railway GraphQL query referralInfo. | |
update | update | code, workspace_id | Updates 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.
| Name | Datatype | Description |
|---|---|---|
workspace_id | string | |
code | string |
SELECT examples​
- get
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​
- update
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;