Class: SolidusGraphqlApi::Queries::Product::MasterVariantQuery

Inherits:
Object
  • Object
show all
Defined in:
lib/solidus_graphql_api/queries/product/master_variant_query.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(product:) ⇒ MasterVariantQuery

Returns a new instance of MasterVariantQuery.



9
10
11
# File 'lib/solidus_graphql_api/queries/product/master_variant_query.rb', line 9

def initialize(product:)
  @product = product
end

Instance Attribute Details

#productObject (readonly)

Returns the value of attribute product.



7
8
9
# File 'lib/solidus_graphql_api/queries/product/master_variant_query.rb', line 7

def product
  @product
end

Instance Method Details

#callObject



13
14
15
# File 'lib/solidus_graphql_api/queries/product/master_variant_query.rb', line 13

def call
  SolidusGraphqlApi::BatchLoader.for(product, :master)
end