-
Notifications
You must be signed in to change notification settings - Fork 217
Open
Labels
bugSomething isn't workingSomething isn't workingkeepEnsures stale-bot keeps this issue/PR openEnsures stale-bot keeps this issue/PR open
Description
Ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-darwin20]
GraphQL Gem Version: 2.0.13
Options enable_platform_field
and enable_platform_authorized
are not compatible with GraphQL gem's own fiber based dataloaders. Turning on these options while using the built-in dataloaders results in missing data and logs like:
ERROR -- : OpenTelemetry error: calls to detach should match corresponding calls to attach.
ERROR -- : OpenTelemetry error: calls to detach should match corresponding calls to attach.
ERROR -- : OpenTelemetry error: calls to detach should match corresponding calls to attach.
ERROR -- : OpenTelemetry error: calls to detach should match corresponding calls to attach.
ERROR -- : OpenTelemetry error: calls to detach should match corresponding calls to attach.
ERROR -- : OpenTelemetry error: calls to detach should match corresponding calls to attach.
I'm assuming this has to do with the way these data loaders work. Somehow, this appeared to be working fine while using NewRelic tracing and it was able to capture traces with details on field hops and authorizations. Removing the dataloaders fixes this problem, but we need them to prevent N+1 query issues.
# field method
def team
dataloader.with(Sources::Record, Team).load(object.team_id)
end
# authorized? method
def self.authorized?(object, context)
can_access_team?(context.dataloader.with(Sources::Record, Team).load(object.team_id))
end
jphenow
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingkeepEnsures stale-bot keeps this issue/PR openEnsures stale-bot keeps this issue/PR open