RailsConf 2023 - Using Rails Engines to Supercharge Your Team by Austin Story

Discover how Doximity supercharged its team using Rails engines and GraphQL Federation to enhance developer experience, facilitate code sharing, and ensure safe deployments.

Key takeaways
  1. Rails engines are a type of Ruby gem that are aware of Rails and its ecosystem. They can be used to package and distribute code that is specific to a particular application or feature.

  2. GraphQL is a query language that allows clients to request specific data from a server. It is often used in conjunction with GraphQL Federation, which allows multiple GraphQL servers to be federated into a single, cohesive API.

  3. Doximity is a 13-year-old Rails-based web application that provides a variety of services to physicians, including telehealth, news, and social networking. Doximity has been using GraphQL Federation to improve the developer experience and make it easier for teams to share code and data.

  4. One of the challenges that Doximity faced was that its GraphQL schema was becoming increasingly complex and difficult to manage. To address this, they created a standard printer to generate a representation of the schema that could be used by all of their microservices.

  5. Doximity also wanted to make it easier for developers to test their GraphQL changes. To do this, they integrated GraphQL Playground with their CI/CD pipeline so that developers could see the results of their changes before they were deployed to production.

  6. Another challenge that Doximity faced was that they needed to ensure that their GraphQL changes were safe to deploy. To do this, they created a configuration error that would be raised if a developer made a change that could potentially break the schema.

  7. Doximity also wanted to make it easy for developers to deploy their GraphQL changes. To do this, they created a generator that would automatically generate the necessary code and configuration changes.

  8. Finally, Doximity wanted to make it easy for developers to debug GraphQL errors. To do this, they integrated their error reporting system with GraphQL so that developers could see the errors that were being generated by their GraphQL queries.

  9. Doximity’s use of Rails engines and GraphQL Federation has helped them to improve the developer experience, make it easier to share code and data, and ensure that their GraphQL changes are safe to deploy.

  10. **Doximity’s experience with GraphQL Federation is a valuable case study for any organization that is considering using GraphQL to build a scalable and maintainable API.