Skip to main content

realtime_configs

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

Overview​

Namerealtime_configs
TypeResource
Idsupabase.config.realtime_configs

Fields​

The following fields are returned by SELECT queries:

Gets project's realtime configuration

NameDatatypeDescription
connection_poolintegerSets connection pool size for Realtime Authorization
max_bytes_per_secondintegerSets maximum number of bytes per second rate per channel limit
max_channels_per_clientintegerSets maximum number of channels per client rate limit
max_concurrent_usersintegerSets maximum number of concurrent users rate limit
max_events_per_secondintegerSets maximum number of events per second rate per channel limit
max_joins_per_secondintegerSets maximum number of joins per second rate limit
max_payload_size_in_kbintegerSets maximum number of payload size in KB rate limit
max_presence_events_per_secondintegerSets maximum number of presence events per second rate limit
postgres_changes_poolintegerSets connection pool size used to create Postgres Changes subscriptions
presence_enabledbooleanWhether to enable presence
private_onlybooleanWhether to only allow private channels
suspendbooleanDisables the Realtime service for this project when true. Set to false to re-enable it.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectref
updateupdateref
shutdownexecref

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
refstringSupabase project reference (the Project ID shown in the dashboard under Settings -> General; 20 lowercase letters). Resolved from the SUPABASE_PROJECT_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every project-scoped query as WHERE ref = '<ref>'. A WHERE value always takes precedence over the environment. (x-stackQL-envVar: SUPABASE_PROJECT_ID)

SELECT examples​

Gets project's realtime configuration

SELECT
connection_pool,
max_bytes_per_second,
max_channels_per_client,
max_concurrent_users,
max_events_per_second,
max_joins_per_second,
max_payload_size_in_kb,
max_presence_events_per_second,
postgres_changes_pool,
presence_enabled,
private_only,
suspend
FROM supabase.config.realtime_configs
WHERE ref = '{{ ref }}' -- required unless SUPABASE_PROJECT_ID is set
;

UPDATE examples​

No description available.

UPDATE supabase.config.realtime_configs
SET
private_only = {{ private_only }},
connection_pool = {{ connection_pool }},
postgres_changes_pool = {{ postgres_changes_pool }},
max_concurrent_users = {{ max_concurrent_users }},
max_events_per_second = {{ max_events_per_second }},
max_bytes_per_second = {{ max_bytes_per_second }},
max_channels_per_client = {{ max_channels_per_client }},
max_joins_per_second = {{ max_joins_per_second }},
max_presence_events_per_second = {{ max_presence_events_per_second }},
max_payload_size_in_kb = {{ max_payload_size_in_kb }},
suspend = {{ suspend }},
presence_enabled = {{ presence_enabled }}
WHERE
ref = '{{ ref }}' --required unless SUPABASE_PROJECT_ID is set;

Lifecycle Methods​

EXEC variables use wire (API) names.

Realtime connections shutdown successfully

EXEC supabase.config.realtime_configs.shutdown
@ref='{{ ref }}' --required unless SUPABASE_PROJECT_ID is set
;