Class: Rspec::GraphQLTypes::TestQuery
- Inherits:
-
GraphQL::Query::NullContext::NullQuery
- Object
- GraphQL::Query::NullContext::NullQuery
- Rspec::GraphQLTypes::TestQuery
- Defined in:
- lib/rspec/graphql_types.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#multiplex ⇒ Object
readonly
Returns the value of attribute multiplex.
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
Instance Method Summary collapse
- #handle_or_reraise(err) ⇒ Object
-
#initialize(context:, schema:) ⇒ TestQuery
constructor
A new instance of TestQuery.
- #trace(_key, _data) ⇒ Object
- #warden ⇒ Object
Constructor Details
#initialize(context:, schema:) ⇒ TestQuery
Returns a new instance of TestQuery.
14 15 16 17 18 19 |
# File 'lib/rspec/graphql_types.rb', line 14 def initialize(context:, schema:) super() @context = context @schema = schema @multiplex = false end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
12 13 14 |
# File 'lib/rspec/graphql_types.rb', line 12 def context @context end |
#multiplex ⇒ Object (readonly)
Returns the value of attribute multiplex.
12 13 14 |
# File 'lib/rspec/graphql_types.rb', line 12 def multiplex @multiplex end |
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
12 13 14 |
# File 'lib/rspec/graphql_types.rb', line 12 def schema @schema end |
Instance Method Details
#handle_or_reraise(err) ⇒ Object
25 26 27 |
# File 'lib/rspec/graphql_types.rb', line 25 def handle_or_reraise(err) schema.handle_or_reraise(context, err) end |
#trace(_key, _data) ⇒ Object
21 22 23 |
# File 'lib/rspec/graphql_types.rb', line 21 def trace(_key, _data) yield end |
#warden ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/rspec/graphql_types.rb', line 29 def warden @warden ||= ::GraphQL::Query::NullContext::NullWarden.new( ::GraphQL::Filter.new, context: context, schema: schema ) end |