Presenter/Decorator Pattern in GraphQL Rails

When I first got into rails, I heard the mantra “fat model, skinny controller” an awful lot. If you’ve never heard this before, the idea is that there should be very little code in your controllers, and your models should have a lot of code/logic. This always felt weird to me – isn’t one of … [Read more…]

GraphQL Connections In Rails

So you’ve been doing some GraphQL. You’ve made some fields that you can query on, maybe even a few mutations, and life is good. Early on however, you think “hmm, what if I have a large set of data that I need to return? I should probably paginate that.” So you go to your trusted … [Read more…]

Are You Afraid?

When introducing others to GraphQL, I’ve noticed that there seems to be a lot of excitement around what it promises and the gaps it intends to fill from REST APIs. I’ve also sensed something else – something that holds people back from diving in and giving it a go for their next project or as … [Read more…]

Building A GraphQL API In Rails

NOTE: This is a post I originally wrote for my job at RevUnit and I’m sharing it here with permission. The original post can be found here. Here at RevUnit we build a lot of web and mobile apps for our clients. When we’re going to build a JSON API, we typically reach for REST … [Read more…]