Skip to content

Wrong error trace showing up #2281

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

Closed
Loschcode opened this issue May 10, 2019 · 1 comment
Closed

Wrong error trace showing up #2281

Loschcode opened this issue May 10, 2019 · 1 comment

Comments

@Loschcode
Copy link

Context

Rails 5.2.2.1
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin18]

My problem

It's been a while I work with this gem and I noticed when I was having errors - usually about syntax or anything which's eager loaded such as class names, etc. - the correct error was showing up once or less, and when I would re-run the exact same query this shows up

{
  "error": "Unable to autoload constant Types::MutationType, expected /my-project/api/app/graphql/types/mutation_type.rb to define it"
}

When testing it out through GraphiQL, my current workaround is to slightly change a file and save it, then re-run to see the real error. The thing is, I believe there should be a better error output than that, something stable.

I'm unsure the gem itself is causing this and not some shady Rails thing, caching up or whatever, so here I ask.

@rmosolgo
Copy link
Owner

rmosolgo commented Jun 6, 2019

Sorry about this. It's an issue with how the schema is lazy-loaded. I'm hoping to fix it in 1.10 (#2100), see also #1505 for similar error issues.

@rmosolgo rmosolgo closed this as completed Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants