rmosolgo / graphql-ruby

Ruby implementation of GraphQL
http://graphql-ruby.org
MIT License
5.37k stars 1.38k forks source link

Runtime Error Duplicate Type #1505

Closed fameoflight closed 4 years ago

fameoflight commented 6 years ago

I am seeing increasing number of runtime error Duplicate types.

I thought this mainly happened due to old api but I am using new class based API.

Has anyone else has faced this problem? It goes away after restating my dyno on heroku.

rmosolgo commented 6 years ago

automated somehow

I don't know how! When would that method be run that you can be sure the schema is totally defined?

We could bust & rebuild the cache after every configuration method but that would be very slow for large schemas.

In the longer term, I'm trying to rebuild execution (#1394) in such a way that these various caches are not required.

jonleighton commented 6 years ago

I proposed a way above:

I think it would be a sensible solution for GraphQL::Railtie to ensure that the schema definition is generated up-front when Rails' eager-loading occurs.

ahukkanen commented 5 years ago

This issue also exists in the Decidim platform in the development environment when the application's constants are being reloaded.

Further details on how to replicate are available here: https://github.com/decidim/decidim/issues/4202

bbugh commented 5 years ago

FYI if you're using the Schema.graphql_definition prewarming trick (which works great) you have to put it after any plugin setup you use (like graphql-errors in our specific case), or it won't work.

Save yourself the headache and just make sure that the trick is after everything else.

No good 👎

LampsappSchema.graphql_definition # This has to be below any other setup

GraphQL::Errors.configure(Schema) do
  rescue_from ActiveRecord::RecordNotFound do |_exception, _object, _arguments, context|
    context.add_error GraphQL::ExecutionError.new("Not Found", options: { code: 404 })
  end
end

Hurray it works! 👍

GraphQL::Errors.configure(Schema) do
  rescue_from ActiveRecord::RecordNotFound do |_exception, _object, _arguments, context|
    context.add_error GraphQL::ExecutionError.new("Not Found", options: { code: 404 })
  end
end

LampsappSchema.graphql_definition
guyzmo commented 5 years ago

hi, I'm also experiencing that issue, which happens in production (at clever-cloud.com), using nginx and up to date ruby. Here's the stacktrace. I do have puma configured with threads. It's happening randomly, rarely but regularly.

I have yet to try the .graphql_definition trick.

Though, one thing is unclear to me: where should I put that trick?

simoleone commented 5 years ago

We've also experienced this issue intermittently. We're all-in on 1.8 syntax and running on ruby 2.5.1 in heroku with puma configured for threads only. We've only seen it in deployed environments, not in development, and we've only seen it a handful of times ever - usually just after a deploy.

We had attempted a pre-warming trick in a rails initializer previously but now I see why that exploded immediately 🙃 , will try pre-warming in the schema definition instead.

xprazak2 commented 5 years ago

I run into this today in development of a new project:

Duplicate type definition found for name 'UpdatePayload' at 'Field Mutation.updateTraining's return type' (#<Class:0x00007f8c1e2bdd90>, #<Class:0x00007f8c1e2aa150>)
/home/o/.rvm/gems/ruby-2.4.4/gems/graphql-1.8.11/lib/graphql/schema/traversal.rb:168:in `visit'
/home/o/.rvm/gems/ruby-2.4.4/gems/graphql-1.8.11/lib/graphql/schema/traversal.rb:205:in `visit_field_on_type'
/home/o/.rvm/gems/ruby-2.4.4/gems/graphql-1.8.11/lib/graphql/schema/traversal.rb:185:in `block in visit_fields'
/home/o/.rvm/gems/ruby-2.4.4/gems/graphql-1.8.11/lib/graphql/schema/traversal.rb:184:in `each'
/home/o/.rvm/gems/ruby-2.4.4/gems/graphql-1.8.11/lib/graphql/schema/traversal.rb:184:in `visit_fields'
/home/o/.rvm/gems/ruby-2.4.4/gems/graphql-1.8.11/lib/graphql/schema/traversal.rb:143:in `visit'
/home/o/.rvm/gems/ruby-2.4.4/gems/graphql-1.8.11/lib/graphql/schema/traversal.rb:124:in `block in visit'
/home/o/.rvm/gems/ruby-2.4.4/gems/graphql-1.8.11/lib/graphql/schema/traversal.rb:124:in `each'
/home/o/.rvm/gems/ruby-2.4.4/gems/graphql-1.8.11/lib/graphql/schema/traversal.rb:124:in `visit'
/home/o/.rvm/gems/ruby-2.4.4/gems/graphql-1.8.11/lib/graphql/schema/traversal.rb:43:in `initialize'
/home/o/.rvm/gems/ruby-2.4.4/gems/graphql-1.8.11/lib/graphql/schema.rb:1059:in `new'
/home/o/.rvm/gems/ruby-2.4.4/gems/graphql-1.8.11/lib/graphql/schema.rb:1059:in `rebuild_artifacts'
/home/o/.rvm/gems/ruby-2.4.4/gems/graphql-1.8.11/lib/graphql/schema.rb:740:in `to_graphql'
/home/o/.rvm/gems/ruby-2.4.4/gems/graphql-1.8.11/lib/graphql/schema/member/accepts_definition.rb:120:in `to_graphql'
/home/o/.rvm/gems/ruby-2.4.4/gems/graphql-1.8.11/lib/graphql/schema.rb:678:in `graphql_definition'
/home/o/.rvm/rubies/ruby-2.4.4/lib/ruby/2.4.0/forwardable.rb:223:in `execute'
/home/o/ruby/stayfit/bfit/app/controllers/graphql_controller.rb:10:in `execute'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/abstract_controller/base.rb:194:in `process_action'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_controller/metal/rendering.rb:30:in `process_action'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/home/o/.rvm/gems/ruby-2.4.4/gems/activesupport-5.2.1.1/lib/active_support/callbacks.rb:132:in `run_callbacks'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/abstract_controller/callbacks.rb:41:in `process_action'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_controller/metal/rescue.rb:22:in `process_action'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
/home/o/.rvm/gems/ruby-2.4.4/gems/activesupport-5.2.1.1/lib/active_support/notifications.rb:168:in `block in instrument'
/home/o/.rvm/gems/ruby-2.4.4/gems/activesupport-5.2.1.1/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/home/o/.rvm/gems/ruby-2.4.4/gems/activesupport-5.2.1.1/lib/active_support/notifications.rb:168:in `instrument'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
/home/o/.rvm/gems/ruby-2.4.4/gems/activerecord-5.2.1.1/lib/active_record/railties/controller_runtime.rb:24:in `process_action'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/abstract_controller/base.rb:134:in `process'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionview-5.2.1.1/lib/action_view/rendering.rb:32:in `process'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_controller/metal.rb:191:in `dispatch'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_controller/metal.rb:252:in `dispatch'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_dispatch/routing/route_set.rb:34:in `serve'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_dispatch/journey/router.rb:52:in `block in serve'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_dispatch/journey/router.rb:35:in `each'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_dispatch/journey/router.rb:35:in `serve'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_dispatch/routing/route_set.rb:840:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/rack-2.0.6/lib/rack/tempfile_reaper.rb:15:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/rack-2.0.6/lib/rack/etag.rb:25:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/rack-2.0.6/lib/rack/conditional_get.rb:38:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/rack-2.0.6/lib/rack/head.rb:12:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/rack-2.0.6/lib/rack/session/abstract/id.rb:232:in `context'
/home/o/.rvm/gems/ruby-2.4.4/gems/rack-2.0.6/lib/rack/session/abstract/id.rb:226:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_dispatch/middleware/cookies.rb:670:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/activerecord-5.2.1.1/lib/active_record/migration.rb:559:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/home/o/.rvm/gems/ruby-2.4.4/gems/activesupport-5.2.1.1/lib/active_support/callbacks.rb:98:in `run_callbacks'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_dispatch/middleware/executor.rb:14:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/web-console-3.7.0/lib/web_console/middleware.rb:135:in `call_app'
/home/o/.rvm/gems/ruby-2.4.4/gems/web-console-3.7.0/lib/web_console/middleware.rb:30:in `block in call'
/home/o/.rvm/gems/ruby-2.4.4/gems/web-console-3.7.0/lib/web_console/middleware.rb:20:in `catch'
/home/o/.rvm/gems/ruby-2.4.4/gems/web-console-3.7.0/lib/web_console/middleware.rb:20:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/railties-5.2.1.1/lib/rails/rack/logger.rb:38:in `call_app'
/home/o/.rvm/gems/ruby-2.4.4/gems/railties-5.2.1.1/lib/rails/rack/logger.rb:26:in `block in call'
/home/o/.rvm/gems/ruby-2.4.4/gems/activesupport-5.2.1.1/lib/active_support/tagged_logging.rb:71:in `block in tagged'
/home/o/.rvm/gems/ruby-2.4.4/gems/activesupport-5.2.1.1/lib/active_support/tagged_logging.rb:28:in `tagged'
/home/o/.rvm/gems/ruby-2.4.4/gems/activesupport-5.2.1.1/lib/active_support/tagged_logging.rb:71:in `tagged'
/home/o/.rvm/gems/ruby-2.4.4/gems/railties-5.2.1.1/lib/rails/rack/logger.rb:26:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/rack-2.0.6/lib/rack/method_override.rb:22:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/rack-2.0.6/lib/rack/runtime.rb:22:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/activesupport-5.2.1.1/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_dispatch/middleware/executor.rb:14:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/actionpack-5.2.1.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/rack-2.0.6/lib/rack/sendfile.rb:111:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/webpacker-3.5.5/lib/webpacker/dev_server_proxy.rb:22:in `perform_request'
/home/o/.rvm/gems/ruby-2.4.4/gems/rack-proxy-0.6.5/lib/rack/proxy.rb:57:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/railties-5.2.1.1/lib/rails/engine.rb:524:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/puma-3.12.0/lib/puma/configuration.rb:225:in `call'
/home/o/.rvm/gems/ruby-2.4.4/gems/puma-3.12.0/lib/puma/server.rb:658:in `handle_request'
/home/o/.rvm/gems/ruby-2.4.4/gems/puma-3.12.0/lib/puma/server.rb:472:in `process_client'
/home/o/.rvm/gems/ruby-2.4.4/gems/puma-3.12.0/lib/puma/server.rb:332:in `block in run'
/home/o/.rvm/gems/ruby-2.4.4/gems/puma-3.12.0/lib/puma/thread_pool.rb:133:in `block in spawn_thread'
Completed 500 Internal Server Error in 56ms (Views: 2.9ms | ActiveRecord: 0.0ms)

I found out the cause was having mutation classes with the same name in different modules:

module Types
  class MutationType < Types::BaseObject

    field :update_user, :mutation => ::Mutations::Users::Update
    field :update_training, :mutation => ::Mutations::Trainings::Update
  end
end

The problem went away when I changed the class names:

module Types
  class MutationType < Types::BaseObject

    field :update_user, :mutation => ::Mutations::Users::UpdateUser
    field :update_training, :mutation => ::Mutations::Trainings::UpdateTraining
  end
end
jufemaiz commented 5 years ago

@xprazak2 I'm seeing this atm too, but not with conflicting class names.

bjeanes commented 5 years ago

Also experiencing this after switching to class-based syntax. We also debugged this enough to have a strong suspicion of race conditions and/or cache pollution of the types cache...

Loschcode commented 5 years ago

I'm also seeing this problem in a fresh deployment with Dokku. I added MySchema.graphql_definition below the schema declaration (with mutation, query, subscription) and i'll be testing it in production.

This is really a pain as the site basically works and crashes after a while for me.

davidw commented 5 years ago

I observed this too. Running on Heroku.

RuntimeError: Duplicate type definition found for name 'FooTask'

Environment: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux] graphiql-rails (1.7.0) (pro version)

module Types
   class AdminOrderType < Types::BaseObject
   ...
     class FooTaskType < Types::BaseObject
       ...
      end

     field :fooTask, type: FooTaskType, null: true, method: :fooTask
     field :barTask, type: FooTaskType, null: true
khamusa commented 4 years ago

Same here, issue happens on heroku when booting up a new dyno.

We are using the gem version 1.8.x, and we had the old DSL type definition api in place. After many tests we found out that migrating to the class based api would solve the issue, so we sped up the whole api migration and we rarely get the issue anymore, but we still do.

A few characteristics of the issue on our side:

I hope this helps.

rmosolgo commented 4 years ago

Hi @khamusa, thanks for the detailed report.

12 workers per process

Especially since you're running a threaded server, I agree that it's a race condition. Just to confirm, do you still experience this issue after adding graphql_definition to the bottom of your schema class? For example:

class MySchema < GraphQL::Schema 
  # ... 

  # force the schema to completely boot: 
  graphql_definition 
end 

I would expect that to load all the types before spinning up worker threads, but I'm interested to hear what your experience has been.

I'm hoping to eliminate the lazy schema boot entirely with #2363 -- I've currently got GitHub's tests passing with that branch, and I'm checking out the performance implications. I hope that branch will cause the whole schema to be loaded as the file is loaded by Ruby, eliminating any runtime race conditions. (It still requires a single-threaded application load -- but I think all Ruby code basically requires that.)

anaulin commented 4 years ago

We've just run into this for the first time, in production only, after using GraphQL for a long while (a year?). Can't reproduce locally. One of our servers restarted and started exhibiting this issue, which went away after forcing a restart. The stack trace is very similar to what others have shared, but I append it below in case there is some extra info to be gleaned for it.

We are also running on Heroku, with Puma configured to use 10 threads. We upgraded from Ruby 2.3 to 2.6 a few weeks ago, and I'm wondering if that makes this issue more prominent. I will be trying the .graphql_definition workaround to see if helps for now.

@rmosolgo I see that you have already merged https://github.com/rmosolgo/graphql-ruby/pull/2363 . Do you have a sense of when it will be released in a stable version? Will there be an update on this issue when that's available to try?

Full stack trace:

File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 168 in visit
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 205 in visit_field_on_type
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 185 in block in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in each
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 143 in visit
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 205 in visit_field_on_type
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 185 in block in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in each
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 143 in visit
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 205 in visit_field_on_type
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 185 in block in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in each
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 143 in visit
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 205 in visit_field_on_type
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 185 in block in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in each
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 143 in visit
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 205 in visit_field_on_type
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 185 in block in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in each
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 143 in visit
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 205 in visit_field_on_type
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 185 in block in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in each
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 143 in visit
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 205 in visit_field_on_type
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 185 in block in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in each
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 205 in visit_field_on_type
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 185 in block in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in each
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 143 in visit
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 205 in visit_field_on_type
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 185 in block in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in each
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 143 in visit
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 205 in visit_field_on_type
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 185 in block in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in each
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 143 in visit
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 205 in visit_field_on_type
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 185 in block in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in each
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 143 in visit
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 205 in visit_field_on_type
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 185 in block in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in each
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 143 in visit
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 205 in visit_field_on_type
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 185 in block in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in each
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 143 in visit
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 205 in visit_field_on_type
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 185 in block in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in each
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 143 in visit
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 205 in visit_field_on_type
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 185 in block in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in each
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 184 in visit_fields
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 143 in visit
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 124 in block in visit
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 124 in each
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 124 in visit
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/traversal.rb" line 43 in initialize
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema.rb" line 1037 in new
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema.rb" line 1037 in rebuild_artifacts
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema.rb" line 272 in types
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/possible_types.rb" line 16 in initialize
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema.rb" line 182 in new
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema.rb" line 182 in initialize_copy
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/define/instance_definable.rb" line 129 in initialize_dup
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/define/instance_definable.rb" line 129 in dup
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/define/instance_definable.rb" line 129 in redefine
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema.rb" line 730 in to_graphql
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema/member/accepts_definition.rb" line 120 in to_graphql
File "/app/vendor/bundle/ruby/2.6.0/gems/graphql-1.8.8/lib/graphql/schema.rb" line 678 in graphql_definition
File "/app/vendor/ruby-2.6.4/lib/ruby/2.6.0/forwardable.rb" line 224 in execute
File "/app/app/controllers/graphql_controller.rb", line 13 in execute
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_controller/metal/basic_implicit_render.rb" line 4 in send_action
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/abstract_controller/base.rb" line 188 in process_action
File "/app/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.4.14/lib/scout_apm/instruments/action_controller_rails_3_rails4.rb" line 72 in process_action
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_controller/metal/rendering.rb" line 30 in process_action
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/abstract_controller/callbacks.rb" line 20 in block in process_action
File "/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb" line 126 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb" line 506 in block (2 levels) in compile
File "/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb" line 455 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb" line 101 in __run_callbacks__
File "/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb" line 750 in _run_process_action_callbacks
File "/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb" line 90 in run_callbacks
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/abstract_controller/callbacks.rb" line 19 in process_action
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_controller/metal/rescue.rb" line 20 in process_action
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_controller/metal/instrumentation.rb" line 32 in block in process_action
File "/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/notifications.rb" line 164 in block in instrument
File "/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/notifications/instrumenter.rb" line 21 in instrument
File "/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/notifications.rb" line 164 in instrument
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_controller/metal/instrumentation.rb" line 30 in process_action
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_controller/metal/params_wrapper.rb" line 248 in process_action
File "/app/vendor/bundle/ruby/2.6.0/gems/activerecord-5.0.7.2/lib/active_record/railties/controller_runtime.rb" line 18 in process_action
File "/app/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.4.14/lib/scout_apm/instruments/action_controller_rails_3_rails4.rb" line 83 in process_action
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/abstract_controller/base.rb" line 126 in process
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_controller/metal.rb" line 190 in dispatch
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_controller/metal.rb" line 262 in dispatch
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_dispatch/routing/route_set.rb" line 50 in dispatch
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_dispatch/routing/route_set.rb" line 32 in serve
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_dispatch/journey/router.rb" line 39 in block in serve
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_dispatch/journey/router.rb" line 26 in each
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_dispatch/journey/router.rb" line 26 in serve
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_dispatch/routing/route_set.rb" line 727 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.4.14/lib/scout_apm/instruments/rails_router.rb" line 29 in call_with_scout_instruments
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb" line 189 in call!
File "/app/vendor/bundle/ruby/2.6.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb" line 167 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/omniauth-1.6.1/lib/omniauth/builder.rb" line 63 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.4.14/lib/scout_apm/middleware.rb" line 17 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/rack/agent_hooks.rb" line 30 in traced_call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/rack/browser_monitoring.rb" line 32 in traced_call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/app/middleware/jwt_authentication.rb", line 41 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/etag.rb" line 25 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/conditional_get.rb" line 38 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/head.rb" line 12 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/session/abstract/id.rb" line 232 in context
File "/app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/session/abstract/id.rb" line 226 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/cookies.rb" line 613 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/callbacks.rb" line 38 in block in call
File "/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb" line 97 in __run_callbacks__
File "/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb" line 750 in _run_call_callbacks
File "/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb" line 90 in run_callbacks
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/callbacks.rb" line 36 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/remote_ip.rb" line 79 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/rollbar-2.16.2/lib/rollbar/middleware/rails/rollbar.rb" line 24 in block in call
File "/app/vendor/bundle/ruby/2.6.0/gems/rollbar-2.16.2/lib/rollbar.rb" line 146 in scoped
File "/app/vendor/bundle/ruby/2.6.0/gems/rollbar-2.16.2/lib/rollbar/middleware/rails/rollbar.rb" line 22 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/debug_exceptions.rb" line 49 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/rollbar-2.16.2/lib/rollbar/middleware/rails/show_exceptions.rb" line 22 in call_with_rollbar
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/show_exceptions.rb" line 31 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/rack/logger.rb" line 36 in call_app
File "/app/vendor/bundle/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/rack/logger.rb" line 24 in block in call
File "/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/tagged_logging.rb" line 69 in block in tagged
File "/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/tagged_logging.rb" line 26 in tagged
File "/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/tagged_logging.rb" line 69 in tagged
File "/app/vendor/bundle/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/rack/logger.rb" line 24 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/request_id.rb" line 24 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/method_override.rb" line 22 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/runtime.rb" line 22 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/cache/strategy/local_cache_middleware.rb" line 28 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/executor.rb" line 12 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/static.rb" line 136 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/sendfile.rb" line 111 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/ssl.rb" line 84 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/hirefire-resource-0.4.2/lib/hirefire/middleware.rb" line 41 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/rack-cors-1.0.2/lib/rack/cors.rb" line 97 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.4.14/lib/scout_apm/instruments/middleware_summary.rb" line 58 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/engine.rb" line 522 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb" line 92 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/configuration.rb" line 227 in call
File "/app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/server.rb" line 660 in handle_request
File "/app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/server.rb" line 474 in process_client
File "/app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/server.rb" line 334 in block in run
0x5424 commented 4 years ago

We've gotten this on staging & prod environments, hosted on Heroku.

Ruby environment

ruby '2.5.7'
gem 'rails', '5.2.3'
gem 'puma', '3.12.0'
gem 'pg', '1.1.3'
gem 'graphql', '1.8.10'

Staging:

The errors have only occurred immediately after a successful deploy, after the first query is parsed & attempts execution. On prod it was initially difficult to debug since the error was only happening in 1 dyno -- the other was completely fine.

Went through the pains of upgrading every GQL Type to class-based, thinking the issue was the combination of the old & new syntaxes.

Since others seem to have success adding MySchema.graphql_definition after schema definition, we'll attempt this solution in the meantime.

From previous replies, this seems to be a multi-threaded issue... Can we expect #2363 to resolve this by v1.10?

nehresma commented 4 years ago

@fire-pls

Can we expect #2363 to resolve this by v1.10?

According to this comment, yes: https://github.com/rmosolgo/graphql-ruby/issues/2018#issuecomment-545470568

roc26002w commented 4 years ago

Hi every one, I have the same issue
"message": "Duplicate type definition found for name 'Show' at 'Field Index.messages's return type' (Types::User::Show, Types::Message::Show)",

and have any idea can fixed then? by the way how can i upgrade version to 1.10.0-dev in my Gemfile?

@rmosolgo help me please ~

rmosolgo commented 4 years ago

@roc26002w , GraphQL's default type name is based on the last part of the class name. For the two classes you defined (Types::User::Show and Types::Message::Show), GraphQL is inferring Show as the type name.

Specify a unique name using graphql_name("MessageShow"), for example, in the class definition.

Alternatively, override self.default_graphql_name in a base class to provide new logic for building a default name.

rmosolgo commented 4 years ago

Hey, I think this issue can be fixed on 1.10, if:

In that setup, GraphQL-Ruby's approach to identifying the types in a schema is brand new, and much simpler. The specific case in #2448 is fixed, for example.

As a matter of housekeeping, I'm going to close this issue. If you try the approach I described above and still encounter this issue, please open a new issue with the full backtrace and a description of how you encountered the problem.

If you try to migrate and run into trouble, please open an issue for that! Thanks so much for your patience and help in debugging this. I think there's light at the end of the tunnel! 🤞