Class: SolidusGraphqlApi::Types::Query
- Inherits:
-
Base::Object
- Object
- GraphQL::Schema::Object
- Base::Object
- SolidusGraphqlApi::Types::Query
- Defined in:
- lib/solidus_graphql_api/types/query.rb
Instance Method Summary collapse
- #completed_orders ⇒ Object
- #countries ⇒ Object
- #current_order ⇒ Object
- #current_store ⇒ Object
- #current_user ⇒ Object
- #product_by_slug(slug:) ⇒ Object
- #products(query: {}) ⇒ Object
- #taxonomies ⇒ Object
Methods inherited from Base::Object
Instance Method Details
#completed_orders ⇒ Object
52 53 54 |
# File 'lib/solidus_graphql_api/types/query.rb', line 52 def completed_orders Queries::CompletedOrdersQuery.new(user: context[:current_user]).call end |
#countries ⇒ Object
48 49 50 |
# File 'lib/solidus_graphql_api/types/query.rb', line 48 def countries Queries::CountriesQuery.new.call end |
#current_order ⇒ Object
79 80 81 |
# File 'lib/solidus_graphql_api/types/query.rb', line 79 def current_order context[:current_order] end |
#current_store ⇒ Object
75 76 77 |
# File 'lib/solidus_graphql_api/types/query.rb', line 75 def current_store context[:current_store] end |
#current_user ⇒ Object
71 72 73 |
# File 'lib/solidus_graphql_api/types/query.rb', line 71 def current_user context[:current_user] end |
#product_by_slug(slug:) ⇒ Object
63 64 65 |
# File 'lib/solidus_graphql_api/types/query.rb', line 63 def product_by_slug(slug:) Queries::ProductBySlugQuery.new.call(slug: slug) end |
#products(query: {}) ⇒ Object
56 57 58 59 60 61 |
# File 'lib/solidus_graphql_api/types/query.rb', line 56 def products(query: {}) Queries::ProductsQuery.new( user: context[:current_user], pricing_options: context[:current_pricing_options] ).call(query: query) end |
#taxonomies ⇒ Object
67 68 69 |
# File 'lib/solidus_graphql_api/types/query.rb', line 67 def taxonomies Queries::TaxonomiesQuery.new.call end |