Skip to content

Commit d89450f

Browse files
committed
fix: graphql playground proxying
1 parent 8f566b2 commit d89450f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Pandvil provides a Docker-based testing environment that:
2020
We haven't set up NPM yet, but you can download from GitHub like so:
2121

2222
```bash
23-
# Replace v0.0.14 with whatever version you want
24-
pnpm add -D https://github.com/morpho-org/pandvil/releases/download/v0.0.14/package.tgz
23+
# Replace v0.0.15 with whatever version you want
24+
pnpm add -D https://github.com/morpho-org/pandvil/releases/download/v0.0.15/package.tgz
2525
```
2626

2727
## Setup

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@morpho-org/pandvil",
33
"description": "A testing environment for ponder that supports chain forking via anvil",
4-
"version": "0.0.14",
4+
"version": "0.0.15",
55
"author": "Morpho Association <[email protected]>",
66
"contributors": [
77
"Hayden Shively <[email protected]>"

src/server/server.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,9 @@ export function startServer({
314314
}
315315

316316
try {
317-
return proxy(`${instance.apiUrl}${c.req.path}`, c.req);
317+
const { search } = new URL(c.req.url);
318+
const target = new URL(c.req.path, instance.apiUrl);
319+
return proxy(`${target}${search}`, c.req);
318320
} catch {
319321
return c.json({ error: "Instance not up yet." }, 503);
320322
}

0 commit comments

Comments
 (0)