Upgrading to Graphiti 2.0
Graphiti 2.0 requires Ruby 3.2+ and Rails 7.1+, and folds graphiti-rails, graphiti_spec_helpers and graphiti_errors into graphiti itself. Those three gems are retired.
For most apps the upgrade is three things:
- Remove
graphiti-rails,graphiti_spec_helpersandgraphiti_errorsfrom your Gemfile. - Add
include Graphiti::Rails::Controllerto the controllers serving your resources. - Update
around_persistencehooks, if you have any — they now receive the model rather than the attributes hash.
Old names still resolve and warn, so nothing breaks halfway through. They are removed in 3.0.
The full upgrade guide lists every rename, what was removed outright, and the migration path for apps not running Rails.