Skip to content

Commit cd71b5b

Browse files
mack-erelclaude
andcommitted
chore: add changeset for remote Hyperdrive bindings in local dev
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 531f707 commit cd71b5b

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
"miniflare": minor
3+
"wrangler": minor
4+
---
5+
6+
Support remote Hyperdrive bindings in local development
7+
8+
Hyperdrive bindings were local-only in `wrangler dev`, so exercising the database behind a deployed Hyperdrive configuration meant running `wrangler dev --remote` or standing up a local copy of the database. Setting `remote: true` on a `hyperdrive` binding now connects local dev to the deployed configuration instead:
9+
10+
```jsonc
11+
{
12+
"hyperdrive": [
13+
{
14+
"binding": "HYPERDRIVE",
15+
"id": "<your-hyperdrive-id>",
16+
// connect to the deployed Hyperdrive configuration in `wrangler dev`
17+
"remote": true,
18+
},
19+
],
20+
}
21+
```
22+
23+
Miniflare stands up a local TCP bridge and points the binding's designator at it, relaying each connection to the edge Hyperdrive binding over the existing remote bindings proxy, so database clients such as `mysql2` and `pg` work unchanged. The edge session's connection string is fetched once per session so the local binding presents credentials the edge proxy accepts, which also makes `localConnectionString` optional whenever that session can be established. When it cannot — you are logged out, offline, or running with remote bindings turned off — the binding falls back to its `localConnectionString` with a warning, or explains what to fix if there is none. This is opt-in — bindings without `remote: true` keep the existing local-only behaviour and need no configuration changes.

0 commit comments

Comments
 (0)