Class: GraphQL::Query::NullContext
- Inherits:
-
Object
- Object
- GraphQL::Query::NullContext
- Extended by:
- Forwardable
- Defined in:
- lib/graphql/query/null_context.rb
Overview
This object can be ctx
in places where there is no query
Defined Under Namespace
Classes: NullQuery, NullWarden
Instance Attribute Summary collapse
-
#dataloader ⇒ Object
readonly
Returns the value of attribute dataloader.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
-
#warden ⇒ Object
readonly
Returns the value of attribute warden.
Class Method Summary collapse
Instance Method Summary collapse
-
#[](key) ⇒ Object
-
#initialize ⇒ NullContext
constructor
A new instance of NullContext.
-
#interpreter? ⇒ Boolean
Constructor Details
#initialize ⇒ NullContext
Returns a new instance of NullContext.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/graphql/query/null_context.rb', line 20 def initialize @query = NullQuery.new @dataloader = GraphQL::Dataloader::NullDataloader.new @schema = GraphQL::Schema.new @warden = NullWarden.new( GraphQL::Filter.new, context: self, schema: @schema, ) end |
Instance Attribute Details
#dataloader ⇒ Object (readonly)
Returns the value of attribute dataloader.
18 19 20 |
# File 'lib/graphql/query/null_context.rb', line 18 def dataloader @dataloader end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
18 19 20 |
# File 'lib/graphql/query/null_context.rb', line 18 def query @query end |
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
18 19 20 |
# File 'lib/graphql/query/null_context.rb', line 18 def schema @schema end |
#warden ⇒ Object (readonly)
Returns the value of attribute warden.
18 19 20 |
# File 'lib/graphql/query/null_context.rb', line 18 def warden @warden end |
Class Method Details
.[](key) ⇒ Object
[View source]
40 |
# File 'lib/graphql/query/null_context.rb', line 40 def [](key); end |
.instance ⇒ Object
[View source]
42 43 44 |
# File 'lib/graphql/query/null_context.rb', line 42 def instance @instance = self.new end |
Instance Method Details
#[](key) ⇒ Object
[View source]
31 |
# File 'lib/graphql/query/null_context.rb', line 31 def [](key); end |
#interpreter? ⇒ Boolean
33 34 35 |
# File 'lib/graphql/query/null_context.rb', line 33 def interpreter? false end |