project_favorites
Creates, updates, deletes, gets or lists a project_favorites resource.
Overview​
| Name | project_favorites |
| Type | Resource |
| Id | railway.projects.project_favorites |
Fields​
The following fields are returned by SELECT queries:
- list
One row per value, as the result column.
| Name | Datatype | Description |
|---|---|---|
result | string | projectFavorites value |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | workspace_id | order_by | The authenticated user's favorited project ids in a workspace, in the order the Favorites row should render them. Defaults to the order they were starred in. Backed by the Railway GraphQL query projectFavorites. |
set | exec | favorite, project_id | Star or unstar a project for the authenticated user. Returns the resulting state. Backed by the Railway GraphQL mutation projectFavoriteSet. |
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 |
|---|---|---|
workspace_id | string | |
order_by | string | |
favorite | string | Boolean passed as a string, for example 'true'. |
project_id | string |
SELECT examples​
- list
The authenticated user's favorited project ids in a workspace, in the order the Favorites row should render them. Defaults to the order they were starred in. Backed by the Railway GraphQL query projectFavorites.
SELECT
result
FROM railway.projects.project_favorites
WHERE workspace_id = '{{ workspace_id }}' -- required
AND order_by = '{{ order_by }}'
;
Lifecycle Methods​
- set
Star or unstar a project for the authenticated user. Returns the resulting state. Backed by the Railway GraphQL mutation projectFavoriteSet.
EXEC railway.projects.project_favorites.set
@favorite='{{ favorite }}', --required
@project_id='{{ project_id }}' --required
;