Class: GraphQL::Groups::PendingQuery
- Inherits:
-
Object
- Object
- GraphQL::Groups::PendingQuery
- Defined in:
- lib/graphql/groups/pending_query.rb
Instance Attribute Summary collapse
-
#aggregate ⇒ Object
readonly
Returns the value of attribute aggregate.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(key, aggregate, proc) ⇒ PendingQuery
constructor
A new instance of PendingQuery.
Constructor Details
#initialize(key, aggregate, proc) ⇒ PendingQuery
Returns a new instance of PendingQuery.
10 11 12 13 14 |
# File 'lib/graphql/groups/pending_query.rb', line 10 def initialize(key, aggregate, proc) @key = Utils.wrap(key) @aggregate = Utils.wrap(aggregate) @query = proc end |
Instance Attribute Details
#aggregate ⇒ Object (readonly)
Returns the value of attribute aggregate.
7 8 9 |
# File 'lib/graphql/groups/pending_query.rb', line 7 def aggregate @aggregate end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
6 7 8 |
# File 'lib/graphql/groups/pending_query.rb', line 6 def key @key end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
8 9 10 |
# File 'lib/graphql/groups/pending_query.rb', line 8 def query @query end |
Instance Method Details
#execute ⇒ Object
16 17 18 19 |
# File 'lib/graphql/groups/pending_query.rb', line 16 def execute result = @query.call QueryResult.new(@key, @aggregate, result) end |