Nostr Wallet Connect GraphQL subgraph for Blink wallet. Built with Apollo Federation, Buck2, and Tilt. Includes Nix for dependency management and Galoy quickstart for local development infrastructure.
- 🚀 Apollo Federation v2 support
- 🛠️ Buck2 and Tilt for development workflow
- ❄️ Nix flakes for reproducible development environment
- 📦 Galoy quickstart with docker-compose
- 🔍 GraphQL codegen for type safety
- 🎯 OpenTelemetry tracing built-in
- ⚡ Nostr Wallet Connect protocol implementation
- Nix with flakes enabled
- direnv (optional but recommended)
- Install dependencies:
pnpm install- Sync vendor dependencies:
vendir sync- Generate GraphQL types:
pnpm generate-gql-types- Start the local development environment:
nix develop -c make startThis starts the Tilt-driven workflow for Blink NWC. Tilt will orchestrate the local containers, codegen, database setup, and the NWC dev server.
Useful endpoints:
- GraphQL playground: http://localhost:4010/graphql
- Apollo Router: http://localhost:4004/graphql
- Tilt UI: http://localhost:10350
For normal local development, use Tilt:
nix develop -c make startFor dependency-only workflows, keep using the compose path:
- Start shared dependencies and Apollo Router:
make start-deps- Start only the NWC subgraph process:
pnpm devThis split path is still useful for CI and for cases where you do not want Tilt managing the full session.
make start- Start the full Tilt-based local development environmentmake tilt-up- Runtilt upexplicitlymake tilt-down- Stop the Tilt sessionmake start-deps- Start only docker-compose dependencies and Apollo Routerpnpm dev- Start only the NWC subgraph serverpnpm build- Build for productionpnpm start- Start production serverpnpm generate-gql-types- Generate TypeScript types from GraphQL schemapnpm generate-supergraph- Generate supergraph schema for federationpnpm tsc-check- Type check TypeScriptpnpm eslint-check- Lint codepnpm eslint-fix- Fix linting issues
.
├── src/
│ ├── config/ # Configuration
│ ├── graphql/ # GraphQL schema and resolvers
│ │ ├── schema.graphql
│ │ └── resolvers.ts
│ ├── server/ # Server setup
│ └── services/ # Service layer (logger, tracing)
├── dev/ # Development configuration
│ └── apollo-federation/
├── vendor/ # Vendored dependencies (galoy-quickstart)
├── flake.nix # Nix flake for development environment
├── vendir.yml # Vendor dependency configuration
└── docker-compose.yml # Docker compose for local services
- Edit
src/graphql/schema.graphqlto define your schema - Update
src/graphql/resolvers.tsto implement your resolvers - Run
pnpm generate-gql-typesto generate TypeScript types - Implement your business logic
SUBGRAPH_PORT- Port for the subgraph server (default: 4010)NODE_ENV- Node environment (default: development)APOLLO_PLAYGROUND_ENABLED- Enable GraphQL playground (default: true)
This project uses Nix flakes for a reproducible development environment. The flake provides:
- Node.js 20
- pnpm
- Docker Compose
- Various development tools (vendir, jq, ytt, buf, etc.)
To enter the development environment:
nix developOr with direnv:
direnv allowThis project uses vendir to manage vendor dependencies from the Galoy repository.
To update:
make update-vendorThe project includes docker-compose configuration for:
- Apollo Router (for federation)
- Dependencies from galoy-quickstart (MongoDB, Redis, etc.)
MIT