Skip to content

[WIP] feat(connector): automerge connector demo#3

Open
ulfgebhardt wants to merge 4 commits intomasterfrom
automerge-connector-demo
Open

[WIP] feat(connector): automerge connector demo#3
ulfgebhardt wants to merge 4 commits intomasterfrom
automerge-connector-demo

Conversation

@ulfgebhardt
Copy link
Member

All done. Here's a summary of what was implemented:

Part 1: createdAt: Date → string

  • data-interface/src/index.ts — createdAt: string in Item interface
  • data-interface/src/demo-data.ts — simplified to direct cast (no new Date() conversion)
  • mock-connector/src/mock-connector.ts — new Date().toISOString()
  • graphql-server/src/store.ts — removed Date replacer from clone(), removed .map() Date conversion, uses .toISOString()
  • graphql-server/src/schema/scalars.ts — DateTime scalar now works with strings only
  • graphql-connector/src/graphql-connector.ts — parseItem passes through as-is

Part 2: stripNulls deduplicated

  • Created graphql-server/src/schema/utils.ts with shared stripNulls
  • Updated imports in queries.ts and subscriptions.ts

Part 3: Automerge-Connector

  • packages/automerge-connector/ with full DataInterface implementation
  • Uses @automerge/automerge-repo + IndexedDBStorageAdapter for persistence
  • Root-Doc / Group-Doc architecture (one doc per group)
  • Demo data seeded on first run, URL persisted in localStorage
  • Reactive observe()/observeItem() via handle.on("change")
  • All 8 packages build successfully with zero type errors

Based on #2

@ulfgebhardt ulfgebhardt self-assigned this Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant