-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Zeitwerk Rails 6 - autoloading warnings #2456
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
Comments
Thanks for reporting this issue and sharing a reproduction of it.
It looks like we can get rid of this by moving the GraphQL::Errors setup into the schema file, for example: rmosolgo/rails6_blog_issue@bc9d4b8 Then, when I ran the tests, I didn't get that warning:
Also, I've just added some error handling to the gem which is inspired heavily by exaspark's work on graphql-errors, so that might help: #2458 Please let me know if that doesn't work for you! |
Thanks @rmosolgo. It worked for the blog example but didn't do the trick in my real application so I suspect that some other initializer must be loading the schema. I'll poke around and see if I can track it down and I'll take a look at the new error handling as well. |
Found it. The schema was being referenced in our datadog initialization. I'll have to figure out a way around that. |
I have this exactly same problem. What was your solution? |
I was referencing the schema in an initializer which apparently was running before other things were set up properly. I just removed the reference from the initializer so it would get loaded normally and that fixed it for me. |
I switched to using |
Adding the graphql-errors gem and this initializer:
to the sample blog app (fresh Rails 6 app) results in the following error when running specs:
I've uploaded the code here: https://github.com/srgoldman/rails6_blog_issue
The text was updated successfully, but these errors were encountered: