Why Bedrock uses Nexus to create its GraphQL schema

Max's Face
Max Stoiber

Nexus is a code-first TypeScript library to write GraphQL schemas. It's how I've written my GraphQL schemas for a year now, and I'm never going back. Four reasons:

  • Incredible TypeScript support: I just start typing and Nexus auto-completes me! Not only that, but I don't have to manually annotate a single resolver and they're still fully type-safe.
  • Single source of truth: Having a schema and a separate list of resolvers that I have to manually match is prone to bugs and impossible to do type-safely. With Nexus, I have a single source of truth for both.
  • Prisma integration: The Prisma plugin means I can quickly expose database fields without having to write resolvers for every single thing. That saves me time and is more type-safe. Win-win!
  • Active maintenance & community: Just like Prisma, Nexus is actively maintained and keeps getting better and better. The community is also very engaged, making it easy to get answers to any question you might have.

All in all, I would highly recommend using Nexus for your next project, which is why Bedrock comes pre-configured with Nexus out of the box. However, it lets you write your GraphQL schema a different way if you prefer, of course!

Jumpstart your next SaaS product with Bedrock

The modern full-stack Next.js & GraphQL boilerplate by @mxstbr with authentication, subscription payments, teams, invitations, emails and everything else you need

Learn more