Class: GraphQL::Query::Context
- Inherits:
-
Object
- Object
- GraphQL::Query::Context
- Defined in:
- lib/graph_ql/query.rb
Overview
Expose some query-specific info to field resolve functions. It delegates ‘[]` to the hash that’s passed to ‘GraphQL::Query#initialize`.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(arbitrary_hash) ⇒ Context
constructor
A new instance of Context.
Constructor Details
#initialize(arbitrary_hash) ⇒ Context
Returns a new instance of Context.
75 76 77 |
# File 'lib/graph_ql/query.rb', line 75 def initialize(arbitrary_hash) @arbitrary_hash = arbitrary_hash end |
Instance Method Details
#[](key) ⇒ Object
79 80 81 |
# File 'lib/graph_ql/query.rb', line 79 def [](key) @arbitrary_hash[key] end |