project_invitations
Creates, updates, deletes, gets or lists a project_invitations resource.
Overview​
| Name | project_invitations |
| Type | Resource |
| Id | railway.projects.project_invitations |
Fields​
The following fields are returned by SELECT queries:
- list
One row per ProjectInvitation.
| Name | Datatype | Description |
|---|---|---|
id | string | |
email | string | |
expires_at | string (date-time) | |
inviter | object | ProjectInvitationInviter object |
is_expired | boolean | |
project | object | PublicProjectInformation object |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | id | Get invitations for a project. Backed by the Railway GraphQL query projectInvitations. | |
create | insert | id, email, role | Create an invitation for a project. Backed by the Railway GraphQL mutation projectInvitationCreate. | |
delete | delete | id | Delete an invitation for a project. Backed by the Railway GraphQL mutation projectInvitationDelete. | |
accept | exec | code | Accept a project invitation using the invite code. Backed by the Railway GraphQL mutation projectInvitationAccept. | |
resend | exec | id | Resend an invitation for a project. Backed by the Railway GraphQL mutation projectInvitationResend. |
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 |
|---|---|---|
id | string | |
code | string | |
email | string | |
role | string | (ADMIN, MEMBER, VIEWER) |
SELECT examples​
- list
Get invitations for a project. Backed by the Railway GraphQL query projectInvitations.
SELECT
id,
email,
expires_at,
inviter,
is_expired,
project
FROM railway.projects.project_invitations
WHERE id = '{{ id }}' -- required
;
INSERT examples​
- create
- Manifest
Create an invitation for a project. Backed by the Railway GraphQL mutation projectInvitationCreate.
INSERT INTO railway.projects.project_invitations (
id,
email,
role
)
SELECT
'{{ id }}' /* required */,
'{{ email }}' /* required */,
'{{ role }}' /* required */
RETURNING
id,
email,
expires_at,
inviter,
is_expired,
project
;
# Description fields are for documentation purposes
- name: project_invitations
props:
- name: id
value: "{{ id }}"
- name: email
value: "{{ email }}"
- name: role
value: "{{ role }}"
valid_values: ['ADMIN', 'MEMBER', 'VIEWER']
DELETE examples​
- delete
Delete an invitation for a project. Backed by the Railway GraphQL mutation projectInvitationDelete.
DELETE FROM railway.projects.project_invitations
WHERE
id = '{{ id }}' --required
;
Lifecycle Methods​
- accept
- resend
Accept a project invitation using the invite code. Backed by the Railway GraphQL mutation projectInvitationAccept.
EXEC railway.projects.project_invitations.accept
@code='{{ code }}' --required
;
Resend an invitation for a project. Backed by the Railway GraphQL mutation projectInvitationResend.
EXEC railway.projects.project_invitations.resend
@id='{{ id }}' --required
;