preferences
Creates, updates, deletes, gets or lists a preferences resource.
Overview​
| Name | preferences |
| Type | Resource |
| Id | railway.account.preferences |
Fields​
The following fields are returned by SELECT queries:
- get
One Preferences row.
| Name | Datatype | Description |
|---|---|---|
id | string | |
build_failed_email | boolean | |
changelog_email | boolean | |
community_email | boolean | |
deploy_crashed_email | boolean | |
ephemeral_environment_email | boolean | |
marketing_email | boolean | |
subprocessor_updates_email | boolean | |
template_queue_email | boolean | |
usage_email | boolean |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | token | Get the email preferences for a user. Backed by the Railway GraphQL query preferences. | |
update | exec | build_failed_email, changelog_email, community_email, deploy_crashed_email, ephemeral_environment_email, marketing_email, subprocessor_updates_email, template_queue_email, token, usage_email | Update the email preferences for a user. Backed by the Railway GraphQL mutation preferencesUpdate. |
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 |
|---|---|---|
token | string | |
build_failed_email | string | Boolean passed as a string, for example 'true'. |
changelog_email | string | Boolean passed as a string, for example 'true'. |
community_email | string | Boolean passed as a string, for example 'true'. |
deploy_crashed_email | string | Boolean passed as a string, for example 'true'. |
ephemeral_environment_email | string | Boolean passed as a string, for example 'true'. |
marketing_email | string | Boolean passed as a string, for example 'true'. |
subprocessor_updates_email | string | Boolean passed as a string, for example 'true'. |
template_queue_email | string | Boolean passed as a string, for example 'true'. |
usage_email | string | Boolean passed as a string, for example 'true'. |
SELECT examples​
- get
Get the email preferences for a user. Backed by the Railway GraphQL query preferences.
SELECT
id,
build_failed_email,
changelog_email,
community_email,
deploy_crashed_email,
ephemeral_environment_email,
marketing_email,
subprocessor_updates_email,
template_queue_email,
usage_email
FROM railway.account.preferences
WHERE token = '{{ token }}'
;
Lifecycle Methods​
- update
Update the email preferences for a user. Backed by the Railway GraphQL mutation preferencesUpdate.
EXEC railway.account.preferences.update
@build_failed_email='{{ build_failed_email }}',
@changelog_email='{{ changelog_email }}',
@community_email='{{ community_email }}',
@deploy_crashed_email='{{ deploy_crashed_email }}',
@ephemeral_environment_email='{{ ephemeral_environment_email }}',
@marketing_email='{{ marketing_email }}',
@subprocessor_updates_email='{{ subprocessor_updates_email }}',
@template_queue_email='{{ template_queue_email }}',
@token='{{ token }}',
@usage_email='{{ usage_email }}'
;