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: NullWarden
Instance Attribute Summary collapse
-
#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.
14 15 16 17 18 19 20 21 22 |
# File 'lib/graphql/query/null_context.rb', line 14 def initialize @query = nil @schema = GraphQL::Schema.new @warden = NullWarden.new( GraphQL::Filter.new, context: self, schema: @schema, ) end |
Instance Attribute Details
#query ⇒ Object (readonly)
Returns the value of attribute query.
12 13 14 |
# File 'lib/graphql/query/null_context.rb', line 12 def query @query end |
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
12 13 14 |
# File 'lib/graphql/query/null_context.rb', line 12 def schema @schema end |
#warden ⇒ Object (readonly)
Returns the value of attribute warden.
12 13 14 |
# File 'lib/graphql/query/null_context.rb', line 12 def warden @warden end |
Class Method Details
.[](key) ⇒ Object
33 |
# File 'lib/graphql/query/null_context.rb', line 33 def [](key); end |
.instance ⇒ Object
35 36 37 |
# File 'lib/graphql/query/null_context.rb', line 35 def instance @instance = self.new end |
Instance Method Details
#[](key) ⇒ Object
24 |
# File 'lib/graphql/query/null_context.rb', line 24 def [](key); end |
#interpreter? ⇒ Boolean
26 27 28 |
# File 'lib/graphql/query/null_context.rb', line 26 def interpreter? false end |