How we combine React, Next.js, GraphQL, Apollo, and Ruby on Rails
I've been keeping a personal journal for about 7 years now. Four months ago, I decided to start a dedicated "Manager Journal" to keep track of my work at Product Hunt.
The story of technical failure at Product Hunt. We used Slate for an HTML editor and tightly coupled its internal structure to our database.
The Product Hunt engineering team has always been remote and it's surprisingly small for all the features and products we are shipping. One of our "secret" weapon for this is what we call "collaborative single-player mode".
Rules I use at Product Hunt to deal and structure external services in Ruby.
Custom tooling and conventions about testing resolver and mutation GraphQL ruby classes.
I'm often asked about the Product Hunt onboarding process for remote engineers. So here is the our onboarding process.
How to deal with N+1 queries in GraphQL within Ruby on Rails project when Active Record's build in preload is not enough.
How to deal with N+1 queries in GraphQL within Ruby on Rails project using GraphQL::Batch gem.
How to handle backend permissions and authorization rules in GraphQL, by exposing flags fields.
How to handle load more buttons with GraphQL and Apollo.
GraphQL's built-in mechanism for errors doesn't play well with forms. This is how I deal with form errors and GraphQL.
I gave a talk at Frontend Developers Conference about how Product Hunt uses GraphQL with Apollo. Here are the slides and video of that talk.
Super simple publish/subscribe pattern using ActiveJob. You setup your events and list the subscribers for them. When an event is triggered, KittyEvents will fanout the event to each of your subscribers.