8000 docs(readme): fix browser example to use the BrowserDb API by adityamukho · Pull Request #6 · project-minigraf/minigraf-wasm · GitHub
[go: up one dir, main page]

Skip to content

docs(readme): fix browser example to use the BrowserDb API - #6

Merged
adityamukho merged 1 commit into
mainfrom
docs/readme-browserdb
Oct 14, 2026
Merged

adityamukho merged 1 commit into
mainfrom
docs/readme-browserdb

Conversation

@adityamukho
Copy link
Copy Markdown
Contributor

Fixes #5.

The browser quick start in the README used MiniGrafDb.inMemory() with a synchronous execute(). That is the API of the Node binding (minigraf on npm), not of @minigraf/browser.

Changes

  • The example now uses await BrowserDb.open('mydb'), notes BrowserDb.openInMemory() for tests, and awaits execute().
  • Documents the JSON shapes that execute() returns.
  • Adds a short table for open, openInMemory, exportGraph, importGraph and checkpoint.
  • Notes that the browser package does not run in Node.js and links to minigraf for server-side use.

Checked against the BrowserDb bindings in the minigraf 2.0.6 crate (src/browser/mod.rs), which is the version pinned in Cargo.toml. The example itself was not run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NKBfvFi6GCQzi635H2ueqk

The browser quick start used MiniGrafDb.inMemory() with a synchronous
execute(), which is the Node binding's API. @minigraf/browser exports
BrowserDb with async open()/openInMemory() and a Promise-returning
execute(). Also document execute()'s JSON shapes, exportGraph(),
importGraph() and checkpoint().

Fixes #5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKBfvFi6GCQzi635H2ueqk
@adityamukho
adityamukho merged commit 71ef437 into main Oct 14, 2026
2 checks passed
@adityamukho
adityamukho deleted the docs/readme-browserdb branch November 6, 2026 03:28
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.

README browser example uses MiniGrafDb.inMemory(), but @minigraf/browser exports BrowserDb

1 participant

0