Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/electric/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ services:
image: electricsql/electric:latest
environment:
DATABASE_URL: postgresql://postgres:password@postgres:5432/electric?sslmode=disable
ELECTRIC_INSECURE: true
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also adds new ELECTRIC_INSECURE env variable to the docker-compose file

ports:
- 3000:3000
depends_on:
Expand Down
6 changes: 3 additions & 3 deletions packages/d2ts/src/electric/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ export function electricStreamToD2Input<T extends Row<unknown> = Row>({
if (changes.length > 0) {
sendChanges(lastLsn)
}
if (typeof message.headers.global_last_seen_lsn !== `number`) {
throw new Error(`global_last_seen_lsn is not a number`)
if (typeof message.headers.global_last_seen_lsn !== `string`) {
throw new Error(`global_last_seen_lsn not in message headers`)
}
const lsn = message.headers.global_last_seen_lsn
sendFrontier(lsn)
sendFrontier(parseInt(lsn))
if (runOn === 'up-to-date' || runOn === 'lsn-advance') {
log?.('running graph on up-to-date')
graph.run()
Expand Down