You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. First of all thanks for this gem. I'm trying to incorporate it into an existing rails 5.2 application but run into some weird/fun loading issues. In various initializers I have pieces of code that is required for my application to boot. For example I define a class that the application code uses etc. When I install graphoid by adding the gem to the bundle and creating the initializer as per the instructions, I would get errors for example for this missing class. If I rename config/initializers/graphoid.rb to config/initializers/zz_graphoid.rb (so it is the last initializer to run), booting the app works as expected.
From looking at the sourcecode of the gem I suspect it's because it asks rails to eager_load. I could be wrong :)
Is there an alternative approach? Relying on the load order seems a little brittle... :)
The text was updated successfully, but these errors were encountered:
@jgrau thank you for using this gem ! unfortunately I stopped maintaining it because of lack of support/usage, so if you find a solution for the loading order or the eager load behaviors please feel free to send a PR, I will be happy to review it !
@jgrau development is on again. I am sending a PR to upgrade versions and use the latest graphql-ruby out there.
I've been going through the initialization process thinking on how to load things in a lazy way.
Will get back with news soon !
Hi. First of all thanks for this gem. I'm trying to incorporate it into an existing rails 5.2 application but run into some weird/fun loading issues. In various initializers I have pieces of code that is required for my application to boot. For example I define a class that the application code uses etc. When I install graphoid by adding the gem to the bundle and creating the initializer as per the instructions, I would get errors for example for this missing class. If I rename
config/initializers/graphoid.rb
toconfig/initializers/zz_graphoid.rb
(so it is the last initializer to run), booting the app works as expected.From looking at the sourcecode of the gem I suspect it's because it asks rails to eager_load. I could be wrong :)
Is there an alternative approach? Relying on the load order seems a little brittle... :)
The text was updated successfully, but these errors were encountered: