Skip to content

Commit

Permalink
feat: host subgraph-compatible api at /subgraph instead of root
Browse files Browse the repository at this point in the history
  • Loading branch information
shrugs committed Jan 15, 2025
1 parent 8ee2353 commit d2e0eab
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { ponder } from "ponder:registry";

import { graphql } from "./middleware";
import { graphql as ponderGraphQL } from "ponder";
import { graphql as subgraphGraphQL } from "./middleware";

// use our custom graphql middleware
ponder.use("/", graphql());
// use ponder middleware at root
ponder.use("/", ponderGraphQL());

// use our custom graphql middleware at /subgraph
ponder.use("/subgraph", subgraphGraphQL());

0 comments on commit d2e0eab

Please sign in to comment.