Skip to main content

user_profiles

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

Overview​

Nameuser_profiles
TypeResource
Idrailway.account.user_profiles

Fields​

The following fields are returned by SELECT queries:

One UserProfileResponse row.

NameDatatypeDescription
idstring
namestring
avatarstring
created_atstring (date-time)
profileobjectUserProfile object
total_deploysinteger
usernamestring

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectusernameGet the public profile for a user. Backed by the Railway GraphQL query userProfile.
updateupdateis_publicUpdates the profile for the authenticated user. Backed by the Railway GraphQL mutation userProfileUpdate.

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
usernamestring
is_publicboolean

SELECT examples​

Get the public profile for a user. Backed by the Railway GraphQL query userProfile.

SELECT
id,
name,
avatar,
created_at,
profile,
total_deploys,
username
FROM railway.account.user_profiles
WHERE username = '{{ username }}' -- required
;

UPDATE examples​

Updates the profile for the authenticated user. Backed by the Railway GraphQL mutation userProfileUpdate.

UPDATE railway.account.user_profiles
SET
bio = '{{ bio }}',
website = '{{ website }}'
WHERE
is_public = '{{ is_public }}' --required
RETURNING
result;