You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Better stream and access token management (#1019)
* fix: use correct join payload
* fix: keep auth token valid while in background when using realtime
* fix: correct supabase_flutter init log
* refactor: add toString method to RealtimeCloseEvent
* fix: reload data from postgrest after new realtime connection
* test: fix mock test by increasing delay
* fix: load postgrest before realtime conn and close realtime on error
* test: restore delay and expect access_token instead of user_token
* test: fix typo
* refactor: small rename
* fix: wait for conn being ready and re-add error to _triggerChanError
* fix: don't stringify errors and fix tests
* test: close conn from server
* fix: disconnect when in background and await connecting to be ready
* fix: rejoin channels in edge case
* docs: improve method comments
Copy file name to clipboardExpand all lines: packages/supabase/lib/src/supabase_query_builder.dart
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -23,11 +23,16 @@ class SupabaseQueryBuilder extends PostgrestQueryBuilder {
23
23
url:Uri.parse(url),
24
24
);
25
25
26
-
/// Returns real-time data from your table as a `Stream`.
26
+
/// Combines the current state of your table from PostgREST with changes from the realtime server to return real-time data from your table as a [Stream].
27
27
///
28
28
/// Realtime is disabled by default for new tables. You can turn it on by [managing replication](https://supabase.com/docs/guides/realtime/extensions/postgres-changes#replication-setup).
29
29
///
30
-
/// Pass the list of primary key column names to [primaryKey], which will be used to updating and deleting the proper records internally as the library receives real-time updates.
30
+
/// Pass the list of primary key column names to [primaryKey], which will be used to update and delete the proper records internally as the stream receives real-time updates.
31
+
///
32
+
/// It handles the lifecycle of the realtime connection and automatically refetches data from PostgREST when needed.
33
+
///
34
+
/// Make sure to provide `onError` and `onDone` callbacks to [Stream.listen] to handle errors and completion of the stream.
35
+
/// The stream gets closed when the realtime connection is closed.
0 commit comments