Module: GraphitiGql::ScopeExtras
- Defined in:
- lib/graphiti_gql/graphiti_hax.rb
Instance Method Summary collapse
Instance Method Details
#initialize(object, resource, query, opts = {}) ⇒ Object
515 516 517 518 519 520 521 522 |
# File 'lib/graphiti_gql/graphiti_hax.rb', line 515 def initialize(object, resource, query, opts = {}) if resource.value_object? object = query.params[:parent] super(object, resource, query, opts) else super end end |
#resolve(*args) ⇒ Object
524 525 526 527 528 529 |
# File 'lib/graphiti_gql/graphiti_hax.rb', line 524 def resolve(*args) results = super raise Graphiti::Errors::InvalidResolve unless results.is_a?(Array) results.reverse! if @query.hash[:reverse] results end |