Comments (4)
Hey, thank you for the very detailed report! I agree, it'd be nice to keep these two working the same way. I'd love to see the patch that you worked up if you don't mind opening a PR.
from graphql-ruby.
Fixed by #4994 -- thanks again!
from graphql-ruby.
Instead of
Thread.current[:arbitrary_context]
you should try usingFiber[:arbitrary_context]
.
I'm not explicitly referencing Thread.current#[]
; my example was just to illustrate how the Datadog gem sets the trace context.
However, I wasn't aware of Fiber::[]
and Fiber::[]=
, so thanks for sharing! I experimented with it a bit and initially didn't understand how variables were passed around fibers. Referring to the docs I could grasp it:
If the storage is unspecified, the default is to inherit a copy of the storage from the current fiber. This is the same as specifying storage: true.
Thanks for chiming in and for all the work you're doing for the Ruby ecosystem.
from graphql-ruby.
Instead of Thread.current[:arbitrary_context]
you should try using Fiber[:arbitrary_context]
.
from graphql-ruby.
Related Issues (20)
- Can't use fields with the name object/context, reserved terms? HOT 3
- Directives Ignored in Patch Upgrade from v2.3.5 to v2.3.6 HOT 3
- `GraphQL::Query#variables` raises `GraphQL::Schema::Enum::MissingValuesError` when the enum isn't visible
- Fields with lazy results aren't resolved inside directive context HOT 1
- Broadcasting for nodes field HOT 1
- Using query params in SQL select HOT 2
- Remove previous token tracking because it's unused
- Return result keys in the same order as the request
- Improve visiblity / type filtering HOT 3
- Some exception class names are unstable when using `GraphQL::Schema.from_definition` HOT 3
- Upgrade to 2.3.8 breaks subscriptions in the schema HOT 3
- Error paths and locations are duplicated with duplicate queries that error lazily
- Schema parsing fails when a union has a leading pipe HOT 1
- graphql_name does not take effect HOT 2
- Rationale for the "defaultValueInvalidOnNonNullVariable" validation HOT 2
- the GraphQL::Schema::Field initialize , ` type` is nil after upgrading GraphQL to the latest version? HOT 5
- Parser does not allow operation names that match the built in operation types HOT 1
- Audit `compare_by_identity` usage
- Query complexity check causes wrong GraphQL error response HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphql-ruby.