Segments

Description

Segments encapsulate larger features in the backend code. A segment contains related companions, models, actors, GiraffeQL resolvers, and jobs.

  • Segments live in app/segments
  • Segments do not contain controllers or views
  • Actors, companions, and resolvers can be public or private
  • Packwerk enforces boundaries
  • It’s acceptable to use ActiveRecord to add associations to models within a Segment

Technology Status at Wunder

Adopt. If you are building new functionality that can be largely decoupled from the main models, default to using segments.

Notes/Resources