graphql-ruby 2.0.18 causing tracer breaking changes
arenclissold opened this issue · 2 comments
The 2.0.18 update to graphql-ruby adds a breaking change to tracers that affects this gem.
Tracing: "execute_field" events on fields defined on interface types will now receive the interface type as data[:owner] instead of the current object type. To get the old behavior, use data[:object].class instead. #4292
A change would likely need to be made in this file: lib/graphql/fragment_cache/schema/tracer.rb
This is causing the below error when attempting to use the gql schema:
Can't add tracer after configuring a `trace_class`, use GraphQL::Tracing::LegacyTrace to merge legacy tracers into a trace class instead.
I'll attempt to make a PR to fix this but am not very familiar with the internal working of this gem or graphql-ruby.
Hey hey, thanks for the heads up 🙂I'll be happy to review and help in any way
Hey,
After testing this in a new project it was working fine and after some investigation, the issue was I needed to use GraphQL::FragmentCache
before using a custom GraphQL::Schema::Timeout
class in the schema. I think loading this first was causing a default trace class to be loaded and then using fragment cache, it attempted to loaded the fragment cache tracer, leading to the error. This is likely due to several changes made to tracers being loaded in the graphql schema in 2.0.18.
Sorry for the false alarm, everything is working properly now, appreciate all your hard work 👍