Class: Giraph::Remote::Connector
- Inherits:
-
Object
- Object
- Giraph::Remote::Connector
- Defined in:
- lib/giraph/remote/connector.rb
Overview
sends the reconstructed subquery request and parses the response.
Instance Method Summary collapse
-
#initialize(endpoint) ⇒ Connector
constructor
A new instance of Connector.
-
#resolve(context, query_string, query_variables) ⇒ Object
The resolver method for the connection field.
Constructor Details
#initialize(endpoint) ⇒ Connector
Returns a new instance of Connector.
7 8 9 |
# File 'lib/giraph/remote/connector.rb', line 7 def initialize(endpoint) @endpoint = endpoint end |
Instance Method Details
#resolve(context, query_string, query_variables) ⇒ Object
The resolver method for the connection field.
12 13 14 15 16 17 18 19 20 |
# File 'lib/giraph/remote/connector.rb', line 12 def resolve(context, query_string, query_variables) # Remote can return data, error or totally freak out, # we handle all here, and note anything of relevance result = run_query(query_string, query_variables) return_data_or_raise(result) do |exception| # Tack on details for host's version of the query exception.ast_node = context.ast_node end end |