A GraphQL microservices starter project with Federation support. Built with Bun and Nitro.
This monorepo contains independent GraphQL microservices that can work together:
Each microservice supports the GraphQL Federation protocol and can be composed through a gateway.
bun install
# Run all services
bun run dev
# Run only auth service
bun run dev:auth
# Run only organization service
bun run dev:organization
When services are running:
Each endpoint includes a GraphQL Playground.
apps/nitro.config.ts:export default defineNitroConfig({
preset: "standard",
modules: ["nitro-graphql"],
graphql: {
framework: "graphql-yoga",
federation: { enabled: true }
}
})
server/graphql/{entity}/{entity}.graphqldefineQuery() and defineMutation()# Build all services
bun run build
# Build a single service (in service folder)
cd apps/auth
bun run build
Build outputs are created in the .output/ folder and can be deployed to any platform using Nitro deployment presets.
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.