Closed svobom57 closed 4 months ago
Hi @svobom57 , @richmolj,
(1) This file changes not reflected after doing bundle install in my project and in gems path
gem 'graphiti'
(2) To get this change for my project I have used along with branch
gem 'graphiti', git: "https://github.com/graphiti-api/graphiti.git", branch: 'master'
(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
So, that without any branches I can direct use in my project path as
gem 'graphiti'
@aravindaytha12 1.4.0 was just officially released, so option 1 should load that version which contains the fixes you need
@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: https://github.com/graphiti-api/graphiti/blob/14e84ef7e10c347ec391b96948365b5195074632/lib/graphiti/util/serializer_relationships.rb#L121 that now returns
nil
after Rails 7.1 upgrade. TheGraphiti.config.context_for_endpoint
is initialized here: https://github.com/graphiti-api/graphiti/blob/14e84ef7e10c347ec391b96948365b5195074632/lib/graphiti/railtie.rb#L113So 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.