template_search
Creates, updates, deletes, gets or lists a template_search resource.
Overview​
| Name | template_search |
| Type | Resource |
| Id | railway.templates.template_search |
Fields​
The following fields are returned by SELECT queries:
- list
One row per TemplateSearchResult.
| Name | Datatype | Description |
|---|---|---|
id | string | |
name | string | |
creator_name | string | |
code | string | |
deployment_count | integer | |
description | string | |
health_score | number | |
image | string | |
is_verified | boolean |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | query | category, verified | Search published templates using the backend-ranked template search index. Backed by the Railway GraphQL query templateSearch. |
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 |
|---|---|---|
query | string | Search term to filter templates. Empty query returns browse-style results. |
category | string | If set, only templates in this category will be returned. |
verified | boolean | If set, only templates matching this verification state will be returned. |
SELECT examples​
- list
Search published templates using the backend-ranked template search index. Backed by the Railway GraphQL query templateSearch.
SELECT
id,
name,
creator_name,
code,
deployment_count,
description,
health_score,
image,
is_verified
FROM railway.templates.template_search
WHERE query = '{{ query }}' -- required
AND category = '{{ category }}'
AND verified = '{{ verified }}'
;