Skip to main content

SyncOptions

Options that affect how the PowerSync SDK connects to the PowerSync Service.

Properties

PropertyTypeDescription
appMetadata?Record<string, string>A set of metadata to be included in service logs.
connectionMethod?SyncStreamConnectionMethodThe connection method to use when streaming updates from the PowerSync backend instance. The default value is SDK-specific. SyncStreamConnectionMethod.HTTP is the preferred implementation and used by default, except for React Native apps without Expo. Those don't support streaming HTTP responses, which is why SyncStreamConnectionMethod.WEB_SOCKET is used as a workaround.
crudUploadThrottleMs?numberBackend Connector CRUD operations are throttled to occur at most every crudUploadThrottleMs milliseconds.
fetchStrategy?FetchStrategy-
includeDefaultStreams?booleanWhether to include streams that have auto_subscribe: true in their definition. This defaults to true.
params?Record<string, JSONValue>These parameters are passed to the sync rules, and will be available under theuser_parameters object.
retryDelayMs?numberDelay for retrying sync streaming operations from the PowerSync backend after an error occurs.