Skip to main content

current_user

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

Overview​

Namecurrent_user
TypeResource
Idrailway.account.current_user

Fields​

The following fields are returned by SELECT queries:

One User row.

NameDatatypeDescription
idstring
namestring
github_provider_idstring
agreed_fair_useboolean
api_token_rate_limitobjectApiTokenRateLimit object
avatarstring
created_atstring (date-time)
emailstring
feature_flagsarray
flagsarray
github_usernamestring
has2faboolean
has_passkeysboolean
is_adminboolean
is_conductorboolean
is_verifiedboolean
last_loginstring (date-time)
profileobjectUserProfile object
registration_statusstring (ONBOARDED, REGISTERED, WAITLISTED)
risk_levelnumber
terms_agreed_onstring (date-time)
usernamestring
workspacesarrayWorkspaces user is member of

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectGets the authenticated user. Backed by the Railway GraphQL query me.
add_feature_flagexecflagAdd a feature flag for a user. Backed by the Railway GraphQL mutation featureFlagAdd.
deleteexecDelete the currently authenticated user. Backed by the Railway GraphQL mutation userDelete.
disconnect_discordexecDisconnect your Railway account from Discord. Backed by the Railway GraphQL mutation userDiscordDisconnect.
leave_betaexecUnsubscribe from the Beta program. Backed by the Railway GraphQL mutation userBetaLeave.
remove_feature_flagexecflagRemove a feature flag for a user. Backed by the Railway GraphQL mutation featureFlagRemove.
remove_flagsexecflagsuser_idRemove a flag on the user. Backed by the Railway GraphQL mutation userFlagsRemove.
set_flagsexecflagsuser_idSet flags on the authenticated user. Backed by the Railway GraphQL mutation userFlagsSet.

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
flagstring(ACTIVITY_FEED_HISTORY, AGENT_BOOTSTRAPS, AGENT_BYOK, AGENT_BYOK_ANTHROPIC, AGENT_BYOK_CHATGPT, AGENT_BYOK_FIREWORKS, AGENT_BYOK_OPENAI, AGENT_BYOK_OPENROUTER, AGENT_CONNECTORS, AGENT_TASKS, BOT_CLOUD_AGENTS, CHAT_SANDBOX, CLOUD_AGENTS, CLOUD_AGENT_BUILDER, CLOUD_AGENT_CHAT, CS_MCP_EXPRESS, EMAIL_FORWARDING, HA_FOR_MONGO, IN_DASHBOARD_SUPPORT, MAGIC_CONFIG, MYSQL_PITR, PRIORITY_BOARDING, RAILWAY_AGENT_DASHBOARD, RAILWAY_AGENT_FEED, TRACING, USAGE_INSIGHTS, VM_STORAGE_TRACES)
flagsarray
user_idstring

SELECT examples​

Gets the authenticated user. Backed by the Railway GraphQL query me.

SELECT
id,
name,
github_provider_id,
agreed_fair_use,
api_token_rate_limit,
avatar,
created_at,
email,
feature_flags,
flags,
github_username,
has2fa,
has_passkeys,
is_admin,
is_conductor,
is_verified,
last_login,
profile,
registration_status,
risk_level,
terms_agreed_on,
username,
workspaces
FROM railway.account.current_user
;

Lifecycle Methods​

Add a feature flag for a user. Backed by the Railway GraphQL mutation featureFlagAdd.

EXEC railway.account.current_user.add_feature_flag
@flag='{{ flag }}' --required
;