Class: SolidusGraphqlApi::Queries::Product::VariantsQuery
- Inherits:
-
Object
- Object
- SolidusGraphqlApi::Queries::Product::VariantsQuery
- Defined in:
- lib/solidus_graphql_api/queries/product/variants_query.rb
Instance Attribute Summary collapse
-
#product ⇒ Object
readonly
Returns the value of attribute product.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(product:) ⇒ VariantsQuery
constructor
A new instance of VariantsQuery.
Constructor Details
#initialize(product:) ⇒ VariantsQuery
Returns a new instance of VariantsQuery.
9 10 11 |
# File 'lib/solidus_graphql_api/queries/product/variants_query.rb', line 9 def initialize(product:) @product = product end |
Instance Attribute Details
#product ⇒ Object (readonly)
Returns the value of attribute product.
7 8 9 |
# File 'lib/solidus_graphql_api/queries/product/variants_query.rb', line 7 def product @product end |
Instance Method Details
#call ⇒ Object
13 14 15 |
# File 'lib/solidus_graphql_api/queries/product/variants_query.rb', line 13 def call SolidusGraphqlApi::BatchLoader.for(product, :variants) end |