Skip to main content

invite_codes

Creates, updates, deletes, gets or lists an invite_codes resource.

Overview​

Nameinvite_codes
TypeResource
Idrailway.projects.invite_codes

Fields​

The following fields are returned by SELECT queries:

One InviteCode row.

NameDatatypeDescription
idstring
project_idstring
codestring
created_atstring (date-time)
projectobjectProject object
rolestring (ADMIN, MEMBER, VIEWER)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcodeGet an invite code by the code. Backed by the Railway GraphQL query inviteCode.
useexeccodeJoin a project using an invite code. Backed by the Railway GraphQL mutation inviteCodeUse.

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
codestring

SELECT examples​

Get an invite code by the code. Backed by the Railway GraphQL query inviteCode.

SELECT
id,
project_id,
code,
created_at,
project,
role
FROM railway.projects.invite_codes
WHERE code = '{{ code }}' -- required
;

Lifecycle Methods​

Join a project using an invite code. Backed by the Railway GraphQL mutation inviteCodeUse.

EXEC railway.projects.invite_codes.use
@code='{{ code }}' --required
;