-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not compatible with Rails 7.1 #460
Comments
(1) This file changes not reflected after doing bundle install in my project and in gems path (2) To get this change for my project I have used along with branch (3) May I know what is the default branch while we use in Gemfile and Why this change not reflected If this PR is closed, can please merge this master branch changes into the required branch |
@aravindaytha12 1.4.0 was just officially released, so option 1 should load that version which contains the fixes you need |
Thanks @jkeen ..! |
Description
We recently tried migrating our app to Rails 7.1 and hit a road block with Graphiti. When I now try to spin up my Rails environment (with
eager_load = true
) I get errors similar to this:I managed to debug what the issue is:
This issue is due to this line of code in Graphiti:
graphiti/lib/graphiti/util/serializer_relationships.rb
Line 121 in 14e84ef
that now returns
nil
after Rails 7.1 upgrade. TheGraphiti.config.context_for_endpoint
is initialized here:graphiti/lib/graphiti/railtie.rb
Line 113 in 14e84ef
So it seems like the above call is now not returning the route properly when a
symbol
route is passed into it anymore.If I cast the
sideload.resource.endpoint[:full_path]
to a string it starts working again...This is because:
since the implementation of the
Rails.application.routes.recognize_path
changed in Rails 7.1.The text was updated successfully, but these errors were encountered: