Why Bedrock uses urql as its GraphQL client

Max's Face
Max Stoiber

urql is a GraphQL client created by the folks at Formidable Labs. I have used it for all of my projects over the past two years, and have had a fantastic experience with it. There are four main reasons why I prefer it over the alternatives:

  • Developer experience: The urql developers have fantastic taste in developer experience. The APIs are well considered, they let you accomplish everything you need to while being intuitive and easy to understand and learn.
  • Extensibility: Yet, even with those carefully designed APIs, urql doesn't restrict you. It ships with many optional "exchanges" (i.e. plugins) to add offline support, retrying, file uploads, and many other things you might want for your app, and you can write your own whenever you want.
  • Small bundle size: Adding urql and its normalized "graphcache" to your app increases your bundle size by 22kB. Other GraphQL clients increase your bundle size by 43kB min + gzip1 — almost double the cost for the same feature set!
  • Ahead of the curve: urql has had hooks and experimental suspense support since the React team announced them! The urql folks are very actively improving urql and staying ahead of the curve with new features added to React.

All in all, I would highly recommend using urql for your next project, which is why Bedrock comes pre-configured with urql out of the box. However, it lets you switch to a different GraphQL client if you want to, 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