solidus_graphql_api 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (253) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +93 -0
  3. data/.gem_release.yml +5 -0
  4. data/.github/stale.yml +17 -0
  5. data/.gitignore +20 -0
  6. data/.rspec +2 -0
  7. data/.rubocop.yml +62 -0
  8. data/CHANGELOG.md +0 -0
  9. data/CONTRIBUTING.md +57 -0
  10. data/Gemfile +33 -0
  11. data/LICENSE +26 -0
  12. data/LICENSE.md +26 -0
  13. data/README.md +245 -0
  14. data/Rakefile +43 -0
  15. data/app/controllers/spree/graphql_controller.rb +49 -0
  16. data/bin/console +17 -0
  17. data/bin/rails +9 -0
  18. data/bin/rails-engine +16 -0
  19. data/bin/rails-sandbox +18 -0
  20. data/bin/rake +8 -0
  21. data/bin/sandbox +84 -0
  22. data/bin/setup +8 -0
  23. data/config/locales/en.yml +6 -0
  24. data/config/routes.rb +5 -0
  25. data/lib/generators/solidus_graphql_api/install/install_generator.rb +8 -0
  26. data/lib/solidus_graphql_api.rb +11 -0
  27. data/lib/solidus_graphql_api/batch_loader.rb +114 -0
  28. data/lib/solidus_graphql_api/batch_loader/belongs_to.rb +30 -0
  29. data/lib/solidus_graphql_api/batch_loader/has_many.rb +24 -0
  30. data/lib/solidus_graphql_api/batch_loader/has_many_through.rb +42 -0
  31. data/lib/solidus_graphql_api/batch_loader/has_one.rb +22 -0
  32. data/lib/solidus_graphql_api/configuration.rb +19 -0
  33. data/lib/solidus_graphql_api/context.rb +76 -0
  34. data/lib/solidus_graphql_api/engine.rb +25 -0
  35. data/lib/solidus_graphql_api/factories.rb +11 -0
  36. data/lib/solidus_graphql_api/factories/address_factory.rb +8 -0
  37. data/lib/solidus_graphql_api/factories/country_factory.rb +12 -0
  38. data/lib/solidus_graphql_api/factories/store_factory.rb +16 -0
  39. data/lib/solidus_graphql_api/factories/taxonomy_factory.rb +26 -0
  40. data/lib/solidus_graphql_api/mutations/.keep +0 -0
  41. data/lib/solidus_graphql_api/mutations/base_mutation.rb +45 -0
  42. data/lib/solidus_graphql_api/mutations/checkout/add_addresses_to_checkout.rb +41 -0
  43. data/lib/solidus_graphql_api/mutations/checkout/add_payment_to_checkout.rb +45 -0
  44. data/lib/solidus_graphql_api/mutations/checkout/add_to_cart.rb +30 -0
  45. data/lib/solidus_graphql_api/mutations/checkout/advance_checkout.rb +27 -0
  46. data/lib/solidus_graphql_api/mutations/checkout/apply_coupon_code.rb +32 -0
  47. data/lib/solidus_graphql_api/mutations/checkout/complete_checkout.rb +31 -0
  48. data/lib/solidus_graphql_api/mutations/checkout/create_order.rb +27 -0
  49. data/lib/solidus_graphql_api/mutations/checkout/empty_cart.rb +29 -0
  50. data/lib/solidus_graphql_api/mutations/checkout/next_checkout_state.rb +27 -0
  51. data/lib/solidus_graphql_api/mutations/checkout/remove_from_cart.rb +33 -0
  52. data/lib/solidus_graphql_api/mutations/checkout/select_shipping_rate.rb +40 -0
  53. data/lib/solidus_graphql_api/mutations/checkout/set_order_email.rb +29 -0
  54. data/lib/solidus_graphql_api/mutations/checkout/update_cart_quantity.rb +41 -0
  55. data/lib/solidus_graphql_api/mutations/user/mark_default_address.rb +31 -0
  56. data/lib/solidus_graphql_api/mutations/user/remove_from_address_book.rb +25 -0
  57. data/lib/solidus_graphql_api/mutations/user/save_in_address_book.rb +30 -0
  58. data/lib/solidus_graphql_api/queries/address/country_query.rb +19 -0
  59. data/lib/solidus_graphql_api/queries/address/state_query.rb +19 -0
  60. data/lib/solidus_graphql_api/queries/completed_orders_query.rb +19 -0
  61. data/lib/solidus_graphql_api/queries/countries_query.rb +11 -0
  62. data/lib/solidus_graphql_api/queries/country/states_query.rb +19 -0
  63. data/lib/solidus_graphql_api/queries/line_item/variant_query.rb +19 -0
  64. data/lib/solidus_graphql_api/queries/option_type/option_values_query.rb +19 -0
  65. data/lib/solidus_graphql_api/queries/order/adjustments_query.rb +19 -0
  66. data/lib/solidus_graphql_api/queries/order/billing_address_query.rb +19 -0
  67. data/lib/solidus_graphql_api/queries/order/line_items_query.rb +19 -0
  68. data/lib/solidus_graphql_api/queries/order/payments_query.rb +19 -0
  69. data/lib/solidus_graphql_api/queries/order/shipments_query.rb +19 -0
  70. data/lib/solidus_graphql_api/queries/order/shipping_address_query.rb +19 -0
  71. data/lib/solidus_graphql_api/queries/product/master_variant_query.rb +19 -0
  72. data/lib/solidus_graphql_api/queries/product/option_types_query.rb +19 -0
  73. data/lib/solidus_graphql_api/queries/product/product_properties_query.rb +19 -0
  74. data/lib/solidus_graphql_api/queries/product/variants_query.rb +19 -0
  75. data/lib/solidus_graphql_api/queries/product_by_slug_query.rb +11 -0
  76. data/lib/solidus_graphql_api/queries/product_property/property_query.rb +19 -0
  77. data/lib/solidus_graphql_api/queries/products_query.rb +29 -0
  78. data/lib/solidus_graphql_api/queries/shipment/shipping_rates_query.rb +19 -0
  79. data/lib/solidus_graphql_api/queries/taxon/children_query.rb +19 -0
  80. data/lib/solidus_graphql_api/queries/taxon/parent_taxon_query.rb +19 -0
  81. data/lib/solidus_graphql_api/queries/taxonomies_query.rb +11 -0
  82. data/lib/solidus_graphql_api/queries/taxonomy/root_taxon_query.rb +19 -0
  83. data/lib/solidus_graphql_api/queries/taxonomy/taxons_query.rb +19 -0
  84. data/lib/solidus_graphql_api/queries/variant/default_price_query.rb +19 -0
  85. data/lib/solidus_graphql_api/queries/variant/images_query.rb +19 -0
  86. data/lib/solidus_graphql_api/queries/variant/option_values_query.rb +19 -0
  87. data/lib/solidus_graphql_api/queries/variant/prices_query.rb +19 -0
  88. data/lib/solidus_graphql_api/schema.rb +40 -0
  89. data/lib/solidus_graphql_api/types/.keep +0 -0
  90. data/lib/solidus_graphql_api/types/address.rb +32 -0
  91. data/lib/solidus_graphql_api/types/base/argument.rb +10 -0
  92. data/lib/solidus_graphql_api/types/base/enum.rb +10 -0
  93. data/lib/solidus_graphql_api/types/base/field.rb +13 -0
  94. data/lib/solidus_graphql_api/types/base/input_object.rb +10 -0
  95. data/lib/solidus_graphql_api/types/base/interface.rb +11 -0
  96. data/lib/solidus_graphql_api/types/base/object.rb +25 -0
  97. data/lib/solidus_graphql_api/types/base/relay_node.rb +13 -0
  98. data/lib/solidus_graphql_api/types/base/scalar.rb +10 -0
  99. data/lib/solidus_graphql_api/types/base/union.rb +10 -0
  100. data/lib/solidus_graphql_api/types/country.rb +23 -0
  101. data/lib/solidus_graphql_api/types/credit_card.rb +18 -0
  102. data/lib/solidus_graphql_api/types/currency.rb +14 -0
  103. data/lib/solidus_graphql_api/types/image.rb +27 -0
  104. data/lib/solidus_graphql_api/types/input_objects/address_input.rb +24 -0
  105. data/lib/solidus_graphql_api/types/input_objects/products_query_input.rb +15 -0
  106. data/lib/solidus_graphql_api/types/interfaces/adjustment.rb +32 -0
  107. data/lib/solidus_graphql_api/types/interfaces/payment_source.rb +19 -0
  108. data/lib/solidus_graphql_api/types/json.rb +63 -0
  109. data/lib/solidus_graphql_api/types/line_item.rb +26 -0
  110. data/lib/solidus_graphql_api/types/manifest_item.rb +12 -0
  111. data/lib/solidus_graphql_api/types/mutation.rb +24 -0
  112. data/lib/solidus_graphql_api/types/option_type.rb +22 -0
  113. data/lib/solidus_graphql_api/types/option_value.rb +15 -0
  114. data/lib/solidus_graphql_api/types/order.rb +63 -0
  115. data/lib/solidus_graphql_api/types/payment.rb +15 -0
  116. data/lib/solidus_graphql_api/types/payment_method.rb +15 -0
  117. data/lib/solidus_graphql_api/types/price.rb +21 -0
  118. data/lib/solidus_graphql_api/types/product.rb +38 -0
  119. data/lib/solidus_graphql_api/types/product_property.rb +19 -0
  120. data/lib/solidus_graphql_api/types/promotion_adjustment.rb +17 -0
  121. data/lib/solidus_graphql_api/types/property.rb +14 -0
  122. data/lib/solidus_graphql_api/types/query.rb +84 -0
  123. data/lib/solidus_graphql_api/types/shipment.rb +23 -0
  124. data/lib/solidus_graphql_api/types/shipping_rate.rb +15 -0
  125. data/lib/solidus_graphql_api/types/state.rb +14 -0
  126. data/lib/solidus_graphql_api/types/store.rb +27 -0
  127. data/lib/solidus_graphql_api/types/tax_adjustment.rb +11 -0
  128. data/lib/solidus_graphql_api/types/taxon.rb +33 -0
  129. data/lib/solidus_graphql_api/types/taxonomy.rb +23 -0
  130. data/lib/solidus_graphql_api/types/user.rb +23 -0
  131. data/lib/solidus_graphql_api/types/user_error.rb +12 -0
  132. data/lib/solidus_graphql_api/types/variant.rb +39 -0
  133. data/lib/solidus_graphql_api/types/wallet_payment_source.rb +14 -0
  134. data/lib/solidus_graphql_api/version.rb +5 -0
  135. data/schema.graphql +2070 -0
  136. data/solidus_graphql_api.gemspec +43 -0
  137. data/spec/integration/mutations/add_to_cart_spec.rb +67 -0
  138. data/spec/integration/mutations/checkout/add_addresses_to_checkout_spec.rb +115 -0
  139. data/spec/integration/mutations/checkout/add_payment_to_checkout_spec.rb +87 -0
  140. data/spec/integration/mutations/checkout/advance_checkout_spec.rb +71 -0
  141. data/spec/integration/mutations/checkout/apply_coupon_code_spec.rb +76 -0
  142. data/spec/integration/mutations/checkout/complete_checkout_spec.rb +56 -0
  143. data/spec/integration/mutations/checkout/next_checkout_state_spec.rb +69 -0
  144. data/spec/integration/mutations/checkout/select_shipping_rate_spec.rb +89 -0
  145. data/spec/integration/mutations/create_order_spec.rb +55 -0
  146. data/spec/integration/mutations/empty_cart_spec.rb +58 -0
  147. data/spec/integration/mutations/mark_default_address_spec.rb +33 -0
  148. data/spec/integration/mutations/remove_from_address_book_spec.rb +48 -0
  149. data/spec/integration/mutations/remove_from_cart_spec.rb +65 -0
  150. data/spec/integration/mutations/save_in_address_book_spec.rb +90 -0
  151. data/spec/integration/mutations/set_order_email_spec.rb +61 -0
  152. data/spec/integration/mutations/update_cart_quantity_spec.rb +68 -0
  153. data/spec/integration/queries/completed_orders_spec.rb +158 -0
  154. data/spec/integration/queries/countries_spec.rb +18 -0
  155. data/spec/integration/queries/current_order_spec.rb +15 -0
  156. data/spec/integration/queries/current_store_spec.rb +15 -0
  157. data/spec/integration/queries/current_user_spec.rb +43 -0
  158. data/spec/integration/queries/product_by_slug_spec.rb +42 -0
  159. data/spec/integration/queries/products_spec.rb +40 -0
  160. data/spec/integration/queries/taxonomies_spec.rb +22 -0
  161. data/spec/lib/solidus_graphql_api/batch_loader/belongs_to_spec.rb +67 -0
  162. data/spec/lib/solidus_graphql_api/batch_loader/has_many_spec.rb +38 -0
  163. data/spec/lib/solidus_graphql_api/batch_loader/has_many_through_spec.rb +47 -0
  164. data/spec/lib/solidus_graphql_api/batch_loader/has_one_spec.rb +38 -0
  165. data/spec/lib/solidus_graphql_api/context_spec.rb +236 -0
  166. data/spec/lib/solidus_graphql_api/queries/address/country_query_spec.rb +13 -0
  167. data/spec/lib/solidus_graphql_api/queries/address/state_query_spec.rb +13 -0
  168. data/spec/lib/solidus_graphql_api/queries/completed_orders_query_spec.rb +12 -0
  169. data/spec/lib/solidus_graphql_api/queries/countries_query_spec.rb +11 -0
  170. data/spec/lib/solidus_graphql_api/queries/country/states_query_spec.rb +11 -0
  171. data/spec/lib/solidus_graphql_api/queries/line_item/variant_query_spec.rb +9 -0
  172. data/spec/lib/solidus_graphql_api/queries/option_type/option_values_query_spec.rb +11 -0
  173. data/spec/lib/solidus_graphql_api/queries/order/adjustments_query_spec.rb +10 -0
  174. data/spec/lib/solidus_graphql_api/queries/order/billing_address_query_spec.rb +11 -0
  175. data/spec/lib/solidus_graphql_api/queries/order/line_items_query_spec.rb +9 -0
  176. data/spec/lib/solidus_graphql_api/queries/order/payments_query_spec.rb +9 -0
  177. data/spec/lib/solidus_graphql_api/queries/order/shipments_query_spec.rb +18 -0
  178. data/spec/lib/solidus_graphql_api/queries/order/shipping_address_query_spec.rb +11 -0
  179. data/spec/lib/solidus_graphql_api/queries/product/master_variant_query_spec.rb +11 -0
  180. data/spec/lib/solidus_graphql_api/queries/product/option_types_query_spec.rb +11 -0
  181. data/spec/lib/solidus_graphql_api/queries/product/product_properties_query_spec.rb +11 -0
  182. data/spec/lib/solidus_graphql_api/queries/product/variants_query_spec.rb +11 -0
  183. data/spec/lib/solidus_graphql_api/queries/product_by_slug_query_spec.rb +13 -0
  184. data/spec/lib/solidus_graphql_api/queries/product_property/property_query_spec.rb +11 -0
  185. data/spec/lib/solidus_graphql_api/queries/products_query_spec.rb +49 -0
  186. data/spec/lib/solidus_graphql_api/queries/shipment/shipping_rates_query_spec.rb +18 -0
  187. data/spec/lib/solidus_graphql_api/queries/taxon/children_query_spec.rb +11 -0
  188. data/spec/lib/solidus_graphql_api/queries/taxon/parent_taxon_query_spec.rb +10 -0
  189. data/spec/lib/solidus_graphql_api/queries/taxonomies_query_spec.rb +11 -0
  190. data/spec/lib/solidus_graphql_api/queries/taxonomy/root_taxon_query_spec.rb +10 -0
  191. data/spec/lib/solidus_graphql_api/queries/taxonomy/taxons_query_spec.rb +11 -0
  192. data/spec/lib/solidus_graphql_api/queries/variant/default_price_query_spec.rb +9 -0
  193. data/spec/lib/solidus_graphql_api/queries/variant/images_query_spec.rb +11 -0
  194. data/spec/lib/solidus_graphql_api/queries/variant/option_values_query_spec.rb +11 -0
  195. data/spec/lib/solidus_graphql_api/queries/variant/prices_query_spec.rb +13 -0
  196. data/spec/lib/solidus_graphql_api/schema_spec.rb +80 -0
  197. data/spec/lib/solidus_graphql_api/types/base/object_spec.rb +29 -0
  198. data/spec/lib/solidus_graphql_api/types/json_spec.rb +115 -0
  199. data/spec/lib/solidus_graphql_api/types/option_type_spec.rb +7 -0
  200. data/spec/lib/solidus_graphql_api/types/product_property_spec.rb +22 -0
  201. data/spec/lib/solidus_graphql_api/types/product_spec.rb +56 -0
  202. data/spec/lib/solidus_graphql_api/types/query_spec.rb +33 -0
  203. data/spec/lib/solidus_graphql_api/types/variant_spec.rb +58 -0
  204. data/spec/requests/spree/graphql_controller_spec.rb +17 -0
  205. data/spec/spec_helper.rb +62 -0
  206. data/spec/support/expected_schema.graphql +2070 -0
  207. data/spec/support/graphql/mutations/add_addresses_to_checkout.gql +19 -0
  208. data/spec/support/graphql/mutations/add_payment_to_checkout.gql +13 -0
  209. data/spec/support/graphql/mutations/add_to_cart.gql +21 -0
  210. data/spec/support/graphql/mutations/advance_checkout.gql +13 -0
  211. data/spec/support/graphql/mutations/apply_coupon_code.gql +13 -0
  212. data/spec/support/graphql/mutations/complete_checkout.gql +13 -0
  213. data/spec/support/graphql/mutations/create_order.gql +11 -0
  214. data/spec/support/graphql/mutations/empty_cart.gql +17 -0
  215. data/spec/support/graphql/mutations/mark_default_address.gql +9 -0
  216. data/spec/support/graphql/mutations/next_checkout_state.gql +13 -0
  217. data/spec/support/graphql/mutations/remove_from_address_book.gql +14 -0
  218. data/spec/support/graphql/mutations/remove_from_cart.gql +17 -0
  219. data/spec/support/graphql/mutations/save_in_address_book.gql +57 -0
  220. data/spec/support/graphql/mutations/select_shipping_rate.gql +23 -0
  221. data/spec/support/graphql/mutations/set_order_email.gql +13 -0
  222. data/spec/support/graphql/mutations/update_cart_quantity.gql +18 -0
  223. data/spec/support/graphql/queries/completed_orders.gql +29 -0
  224. data/spec/support/graphql/queries/completed_orders/adjustments.gql +24 -0
  225. data/spec/support/graphql/queries/completed_orders/available_payment_methods.gql +15 -0
  226. data/spec/support/graphql/queries/completed_orders/billing_address.gql +40 -0
  227. data/spec/support/graphql/queries/completed_orders/line_items.gql +23 -0
  228. data/spec/support/graphql/queries/completed_orders/payments.gql +23 -0
  229. data/spec/support/graphql/queries/completed_orders/shipping_address.gql +40 -0
  230. data/spec/support/graphql/queries/countries.gql +24 -0
  231. data/spec/support/graphql/queries/current_order.gql +32 -0
  232. data/spec/support/graphql/queries/current_store.gql +24 -0
  233. data/spec/support/graphql/queries/current_user.gql +197 -0
  234. data/spec/support/graphql/queries/product_by_slug.gql +106 -0
  235. data/spec/support/graphql/queries/products.gql +7 -0
  236. data/spec/support/graphql/queries/taxonomies.gql +81 -0
  237. data/spec/support/graphql/responses/completed_orders.json.erb +58 -0
  238. data/spec/support/graphql/responses/completed_orders/adjustments.json.erb +34 -0
  239. data/spec/support/graphql/responses/completed_orders/available_payment_methods.json.erb +29 -0
  240. data/spec/support/graphql/responses/completed_orders/billing_address.json.erb +78 -0
  241. data/spec/support/graphql/responses/completed_orders/line_items.json.erb +43 -0
  242. data/spec/support/graphql/responses/completed_orders/payments.json.erb +27 -0
  243. data/spec/support/graphql/responses/completed_orders/shipping_address.json.erb +78 -0
  244. data/spec/support/graphql/responses/countries.json.erb +51 -0
  245. data/spec/support/graphql/responses/current_order.json.erb +36 -0
  246. data/spec/support/graphql/responses/current_store.json.erb +34 -0
  247. data/spec/support/graphql/responses/current_user.json.erb +232 -0
  248. data/spec/support/graphql/responses/product_by_slug.json.erb +123 -0
  249. data/spec/support/graphql/responses/taxonomies.json.erb +145 -0
  250. data/spec/support/helpers/graphql.rb +43 -0
  251. data/spec/support/matchers/graphql.rb +35 -0
  252. data/spec/support/shared_contexts/graphql_query_subject.rb +21 -0
  253. metadata +572 -0
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe SolidusGraphqlApi::Types::Base::Object do
6
+ subject { Class.new(described_class) }
7
+
8
+ describe '.remove_field' do
9
+ context 'when the field is defined' do
10
+ before do
11
+ subject.field :name, String, null: false
12
+ end
13
+
14
+ it 'removes the field' do
15
+ expect {
16
+ subject.remove_field :name
17
+ }.to change { subject.own_fields['name'] }.to(nil)
18
+ end
19
+ end
20
+
21
+ context 'when the field is not defined' do
22
+ it 'raises an ArgumentError' do
23
+ expect {
24
+ subject.remove_field :name
25
+ }.to raise_error(ArgumentError)
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,115 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe SolidusGraphqlApi::Types::Json do
6
+ describe '.coerce_input' do
7
+ subject { described_class.coerce_input(value, nil) }
8
+
9
+ let(:value) do
10
+ {
11
+ number: 1,
12
+ string: 'string',
13
+ id: 'U3ByZWU6OkNvdW50cnktMQ==', # Spree::Country-1
14
+ generic_base64: 'U3ByZWU6OkNvdW50cnktdGVzdA==', # Spree::Country-test
15
+ hash: {
16
+ id: 'U3ByZWU6OlByb21vdGlvbkFjdGlvbi04', # Spree::PromotionAction-8
17
+ generic_base64: 'U3ByZWU6OkNvdW50cnktdGVzdA==', # Spree::Country-test
18
+ strings_array: [
19
+ 'string1', 'string2'
20
+ ],
21
+ ids_array: [
22
+ 'U3ByZWU6OkNvdW50cnktMg==', 'U3ByZWU6OkNvdW50cnktMw==' # Spree::Country-2, Spree::Country-3
23
+ ]
24
+ },
25
+ strings_array: [
26
+ 'string1', 'string2'
27
+ ],
28
+ numbers_array: [
29
+ 1, 2
30
+ ],
31
+ ids_array: [
32
+ 'U3ByZWU6OkNvdW50cnktMg==', 'U3ByZWU6OkNvdW50cnktMw==' # Spree::Country-2, Spree::Country-3
33
+ ],
34
+ generic_base64_array: [
35
+ 'VGVzdDE=', 'VGVzdDI=' # Test1, Test2
36
+ ],
37
+ hash_array: [
38
+ {
39
+ ids_array: [
40
+ 'U3ByZWU6OlByb21vdGlvbkFjdGlvbi02', 'U3ByZWU6OlByb21vdGlvbkFjdGlvbi04' # Spree::PromotionAction-6, Spree::PromotionAction-8
41
+ ],
42
+ ids_hash: {
43
+ id: 'U3ByZWU6OkFkanVzdG1lbnQtNQ==', # Spree::Adjustment-5
44
+ id_action_parameters: ActionController::Parameters.new(id: 'U3ByZWU6Ok9yZGVyLTI=') # Spree::Order-2
45
+ }
46
+ },
47
+ {
48
+ string: 'string',
49
+ strings_array: [
50
+ 'string3', 'string4'
51
+ ],
52
+ numbers_array: [
53
+ 3, 4
54
+ ],
55
+ id: 'U3ByZWU6Ok9yZGVyLTE=' # Spree::Order-1
56
+ }
57
+ ]
58
+ }
59
+ end
60
+
61
+ let(:result) do
62
+ {
63
+ number: 1,
64
+ string: 'string',
65
+ id: 1,
66
+ generic_base64: 'U3ByZWU6OkNvdW50cnktdGVzdA==',
67
+ hash: {
68
+ id: 8,
69
+ generic_base64: 'U3ByZWU6OkNvdW50cnktdGVzdA==',
70
+ strings_array: [
71
+ 'string1', 'string2'
72
+ ],
73
+ ids_array: [
74
+ 2, 3
75
+ ]
76
+ },
77
+ strings_array: [
78
+ 'string1', 'string2'
79
+ ],
80
+ numbers_array: [
81
+ 1, 2
82
+ ],
83
+ ids_array: [
84
+ 2, 3
85
+ ],
86
+ generic_base64_array: [
87
+ 'VGVzdDE=', 'VGVzdDI='
88
+ ],
89
+ hash_array: [
90
+ {
91
+ ids_array: [
92
+ 6, 8
93
+ ],
94
+ ids_hash: {
95
+ id: 5,
96
+ id_action_parameters: ActionController::Parameters.new(id: 2)
97
+ }
98
+ },
99
+ {
100
+ string: 'string',
101
+ strings_array: [
102
+ 'string3', 'string4'
103
+ ],
104
+ numbers_array: [
105
+ 3, 4
106
+ ],
107
+ id: 1
108
+ }
109
+ ]
110
+ }
111
+ end
112
+
113
+ it { is_expected.to eq(result) }
114
+ end
115
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe SolidusGraphqlApi::Types::OptionType do
6
+ it { expect(described_class.method_defined?(:option_values)).to be_truthy }
7
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe SolidusGraphqlApi::Types::ProductProperty do
6
+ let(:product_property) { double(:product_property) }
7
+ let(:query_object) { spy(:query_object) }
8
+
9
+ subject { described_class.send(:new, product_property, {}) }
10
+
11
+ describe '#property' do
12
+ let(:query_class) { SolidusGraphqlApi::Queries::ProductProperty::PropertyQuery }
13
+
14
+ before { allow(query_class).to receive(:new).and_return(query_object) }
15
+
16
+ after { subject.property }
17
+
18
+ it { expect(query_class).to receive(:new).with(product_property: product_property) }
19
+
20
+ it { expect(query_object).to receive(:call) }
21
+ end
22
+ end
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe SolidusGraphqlApi::Types::Product do
6
+ let(:product) { create(:product) }
7
+ let(:query_object) { spy(:query_object) }
8
+
9
+ subject { described_class.send(:new, product, {}) }
10
+
11
+ describe '#master_variant' do
12
+ before do
13
+ allow(SolidusGraphqlApi::Queries::Product::MasterVariantQuery).to receive(:new).and_return(query_object)
14
+ end
15
+
16
+ after { subject.master_variant }
17
+
18
+ it { expect(SolidusGraphqlApi::Queries::Product::MasterVariantQuery).to receive(:new).with(product: product) }
19
+
20
+ it { expect(query_object).to receive(:call) }
21
+ end
22
+
23
+ describe '#option_types' do
24
+ before do
25
+ allow(SolidusGraphqlApi::Queries::Product::OptionTypesQuery).to receive(:new).and_return(query_object)
26
+ end
27
+
28
+ after { subject.option_types }
29
+
30
+ it { expect(SolidusGraphqlApi::Queries::Product::OptionTypesQuery).to receive(:new).with(product: product) }
31
+
32
+ it { expect(query_object).to receive(:call) }
33
+ end
34
+
35
+ describe '#product_properties' do
36
+ before do
37
+ allow(SolidusGraphqlApi::Queries::Product::ProductPropertiesQuery).to receive(:new).with(product: product).and_return(query_object)
38
+ end
39
+
40
+ after { subject.product_properties }
41
+
42
+ it { expect(query_object).to receive(:call) }
43
+ end
44
+
45
+ describe '#variants' do
46
+ before do
47
+ allow(SolidusGraphqlApi::Queries::Product::VariantsQuery).to receive(:new).and_return(query_object)
48
+ end
49
+
50
+ after { subject.variants }
51
+
52
+ it { expect(SolidusGraphqlApi::Queries::Product::VariantsQuery).to receive(:new).with(product: product) }
53
+
54
+ it { expect(query_object).to receive(:call) }
55
+ end
56
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe SolidusGraphqlApi::Types::Query do
6
+ subject { described_class.send(:new, {}, {}) }
7
+
8
+ it { expect(described_class.method_defined?(:taxonomies)).to be_truthy }
9
+
10
+ describe '#products' do
11
+ let(:query_object) { spy(:query_object) }
12
+
13
+ before { allow(SolidusGraphqlApi::Queries::ProductsQuery).to receive(:new).and_return(query_object) }
14
+
15
+ after { subject.products }
16
+
17
+ it { expect(SolidusGraphqlApi::Queries::ProductsQuery).to receive(:new) }
18
+
19
+ it { expect(query_object).to receive(:call) }
20
+ end
21
+
22
+ describe '#product_by_slug' do
23
+ let(:query_object) { spy(:query_object) }
24
+
25
+ let(:slug) { 'slug' }
26
+
27
+ before { allow(SolidusGraphqlApi::Queries::ProductBySlugQuery).to receive(:new).with(no_args).and_return(query_object) }
28
+
29
+ after { subject.product_by_slug(slug: slug) }
30
+
31
+ it { expect(query_object).to receive(:call).with(slug: slug) }
32
+ end
33
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe SolidusGraphqlApi::Types::Variant do
6
+ let(:variant) { create(:variant) }
7
+ let(:query_object) { spy(:query_object) }
8
+
9
+ subject { described_class.send(:new, variant, {}) }
10
+
11
+ describe '#default_price' do
12
+ before do
13
+ allow(SolidusGraphqlApi::Queries::Variant::DefaultPriceQuery).to receive(:new).and_return(query_object)
14
+ end
15
+
16
+ after { subject.default_price }
17
+
18
+ it { expect(SolidusGraphqlApi::Queries::Variant::DefaultPriceQuery).to receive(:new).with(variant: variant) }
19
+
20
+ it { expect(query_object).to receive(:call) }
21
+ end
22
+
23
+ describe '#images' do
24
+ before do
25
+ allow(SolidusGraphqlApi::Queries::Variant::ImagesQuery).to receive(:new).and_return(query_object)
26
+ end
27
+
28
+ after { subject.images }
29
+
30
+ it { expect(SolidusGraphqlApi::Queries::Variant::ImagesQuery).to receive(:new).with(variant: variant) }
31
+
32
+ it { expect(query_object).to receive(:call) }
33
+ end
34
+
35
+ describe '#option_values' do
36
+ before do
37
+ allow(SolidusGraphqlApi::Queries::Variant::OptionValuesQuery).to receive(:new).and_return(query_object)
38
+ end
39
+
40
+ after { subject.option_values }
41
+
42
+ it { expect(SolidusGraphqlApi::Queries::Variant::OptionValuesQuery).to receive(:new).with(variant: variant) }
43
+
44
+ it { expect(query_object).to receive(:call) }
45
+ end
46
+
47
+ describe '#prices' do
48
+ before do
49
+ allow(SolidusGraphqlApi::Queries::Variant::PricesQuery).to receive(:new).and_return(query_object)
50
+ end
51
+
52
+ after { subject.prices }
53
+
54
+ it { expect(SolidusGraphqlApi::Queries::Variant::PricesQuery).to receive(:new).with(variant: variant) }
55
+
56
+ it { expect(query_object).to receive(:call) }
57
+ end
58
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe Spree::GraphqlController do
6
+ let(:context) { Hash[] }
7
+
8
+ before { allow_any_instance_of(SolidusGraphqlApi::Context).to receive(:to_h).and_return(context) }
9
+
10
+ after { post '/graphql', headers: headers }
11
+
12
+ it 'passes the right context to the schema' do
13
+ expect(SolidusGraphqlApi::Schema).to receive(:execute).with(
14
+ nil, hash_including(context: context)
15
+ )
16
+ end
17
+ end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Configure Rails Environment
4
+ ENV['RAILS_ENV'] = 'test'
5
+
6
+ # Run Coverage report
7
+ require 'solidus_dev_support/rspec/coverage'
8
+
9
+ require(File.expand_path('dummy/config/environment.rb', __dir__).tap { |file|
10
+ # Create the dummy app if it's still missing.
11
+ system 'bin/rake extension:test_app' unless File.exist? file
12
+ })
13
+
14
+ # Requires factories and other useful helpers defined in spree_core.
15
+ require 'solidus_dev_support/rspec/rails_helper'
16
+ require 'pry'
17
+ require "graphql/schema_comparator"
18
+ require 'with_model'
19
+ require 'timecop'
20
+
21
+ # Requires supporting ruby files with custom matchers and macros, etc,
22
+ # in spec/support/ and its subdirectories.
23
+ Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f }
24
+
25
+ # Requires factories defined in lib/solidus_graphql_api/factories.rb
26
+ require 'solidus_graphql_api/factories'
27
+
28
+ RSpec.configure do |config|
29
+ config.add_setting :default_freeze_date, default: "21/12/2012 12:00:00"
30
+ config.add_setting :graphql_queries_dir, default: "spec/support/graphql/queries"
31
+ config.add_setting :graphql_mutations_dir, default: "spec/support/graphql/mutations"
32
+ config.add_setting :graphql_responses_dir, default: "spec/support/graphql/responses"
33
+
34
+ config.infer_spec_type_from_file_location!
35
+ config.use_transactional_fixtures = false
36
+ config.include Helpers::Graphql
37
+ config.include Matchers::Graphql
38
+
39
+ # They can be used in the specs to explain better the result of a Graphql query.
40
+ config.alias_example_group_to :describe_query, type: :graphql_query
41
+ config.alias_example_group_to :connection_field, type: :graphql_query
42
+ config.alias_example_group_to :field, type: :graphql_query
43
+ config.alias_example_group_to :describe_mutation, type: :graphql_mutation
44
+
45
+ config.before(:each) do
46
+ BatchLoader::Executor.clear_current
47
+ end
48
+
49
+ config.around(:each, type: :graphql_query) do |example|
50
+ freeze_date = example.metadata[:freeze_date]
51
+
52
+ if freeze_date
53
+ Timecop.freeze(DateTime.parse(freeze_date.is_a?(String) ? freeze_date : RSpec.configuration.default_freeze_date))
54
+ example.run
55
+ Timecop.return
56
+ else
57
+ example.run
58
+ end
59
+ end
60
+
61
+ config.extend WithModel
62
+ end
@@ -0,0 +1,2070 @@
1
+ """
2
+ Autogenerated input type of AddAddressesToCheckout
3
+ """
4
+ input AddAddressesToCheckoutInput {
5
+ billingAddress: AddressInput!
6
+
7
+ """
8
+ A unique identifier for the client performing the mutation.
9
+ """
10
+ clientMutationId: String
11
+ shipToBillingAddress: Boolean
12
+ shippingAddress: AddressInput
13
+ }
14
+
15
+ """
16
+ Autogenerated return type of AddAddressesToCheckout
17
+ """
18
+ type AddAddressesToCheckoutPayload {
19
+ """
20
+ A unique identifier for the client performing the mutation.
21
+ """
22
+ clientMutationId: String
23
+ errors: [UserError!]!
24
+ order: Order
25
+ }
26
+
27
+ """
28
+ Autogenerated input type of AddPaymentToCheckout
29
+ """
30
+ input AddPaymentToCheckoutInput {
31
+ amount: Float
32
+
33
+ """
34
+ A unique identifier for the client performing the mutation.
35
+ """
36
+ clientMutationId: String
37
+ paymentMethodId: ID!
38
+ source: Json
39
+ }
40
+
41
+ """
42
+ Autogenerated return type of AddPaymentToCheckout
43
+ """
44
+ type AddPaymentToCheckoutPayload {
45
+ """
46
+ A unique identifier for the client performing the mutation.
47
+ """
48
+ clientMutationId: String
49
+ errors: [UserError!]!
50
+ order: Order
51
+ }
52
+
53
+ """
54
+ Autogenerated input type of AddToCart
55
+ """
56
+ input AddToCartInput {
57
+ """
58
+ A unique identifier for the client performing the mutation.
59
+ """
60
+ clientMutationId: String
61
+ quantity: Int!
62
+ variantId: ID!
63
+ }
64
+
65
+ """
66
+ Autogenerated return type of AddToCart
67
+ """
68
+ type AddToCartPayload {
69
+ """
70
+ A unique identifier for the client performing the mutation.
71
+ """
72
+ clientMutationId: String
73
+ errors: [UserError!]!
74
+ order: Order
75
+ }
76
+
77
+ """
78
+ Address.
79
+ """
80
+ type Address implements Node {
81
+ address1: String!
82
+ address2: String
83
+ alternativePhone: String
84
+ city: String!
85
+ company: String
86
+ country: Country!
87
+ createdAt: ISO8601DateTime
88
+ firstname: String!
89
+ id: ID!
90
+ lastname: String
91
+ phone: String!
92
+ state: State
93
+ stateName: String
94
+ updatedAt: ISO8601DateTime
95
+ zipcode: String!
96
+ }
97
+
98
+ """
99
+ The connection type for Address.
100
+ """
101
+ type AddressConnection {
102
+ """
103
+ A list of edges.
104
+ """
105
+ edges: [AddressEdge]
106
+
107
+ """
108
+ A list of nodes.
109
+ """
110
+ nodes: [Address]
111
+
112
+ """
113
+ Information to aid in pagination.
114
+ """
115
+ pageInfo: PageInfo!
116
+ }
117
+
118
+ """
119
+ An edge in a connection.
120
+ """
121
+ type AddressEdge {
122
+ """
123
+ A cursor for use in pagination.
124
+ """
125
+ cursor: String!
126
+
127
+ """
128
+ The item at the end of the edge.
129
+ """
130
+ node: Address
131
+ }
132
+
133
+ """
134
+ Address.
135
+ """
136
+ input AddressInput {
137
+ address1: String!
138
+ address2: String
139
+ alternativePhone: String
140
+ city: String!
141
+ company: String
142
+ countryId: ID!
143
+ firstname: String!
144
+ lastname: String
145
+ phone: String!
146
+ stateId: ID
147
+ stateName: String
148
+ zipcode: String!
149
+ }
150
+
151
+ """
152
+ Adjustment.
153
+ """
154
+ interface Adjustment {
155
+ amount: String!
156
+ createdAt: ISO8601DateTime
157
+ eligible: Boolean!
158
+ label: String!
159
+ updatedAt: ISO8601DateTime
160
+ }
161
+
162
+ """
163
+ The connection type for Adjustment.
164
+ """
165
+ type AdjustmentConnection {
166
+ """
167
+ A list of edges.
168
+ """
169
+ edges: [AdjustmentEdge]
170
+
171
+ """
172
+ A list of nodes.
173
+ """
174
+ nodes: [Adjustment]
175
+
176
+ """
177
+ Information to aid in pagination.
178
+ """
179
+ pageInfo: PageInfo!
180
+ }
181
+
182
+ """
183
+ An edge in a connection.
184
+ """
185
+ type AdjustmentEdge {
186
+ """
187
+ A cursor for use in pagination.
188
+ """
189
+ cursor: String!
190
+
191
+ """
192
+ The item at the end of the edge.
193
+ """
194
+ node: Adjustment
195
+ }
196
+
197
+ """
198
+ Autogenerated input type of AdvanceCheckout
199
+ """
200
+ input AdvanceCheckoutInput {
201
+ """
202
+ A unique identifier for the client performing the mutation.
203
+ """
204
+ clientMutationId: String
205
+ }
206
+
207
+ """
208
+ Autogenerated return type of AdvanceCheckout
209
+ """
210
+ type AdvanceCheckoutPayload {
211
+ """
212
+ A unique identifier for the client performing the mutation.
213
+ """
214
+ clientMutationId: String
215
+ errors: [UserError!]!
216
+ order: Order
217
+ }
218
+
219
+ """
220
+ Autogenerated input type of ApplyCouponCode
221
+ """
222
+ input ApplyCouponCodeInput {
223
+ """
224
+ A unique identifier for the client performing the mutation.
225
+ """
226
+ clientMutationId: String
227
+ couponCode: String!
228
+ }
229
+
230
+ """
231
+ Autogenerated return type of ApplyCouponCode
232
+ """
233
+ type ApplyCouponCodePayload {
234
+ """
235
+ A unique identifier for the client performing the mutation.
236
+ """
237
+ clientMutationId: String
238
+ errors: [UserError!]!
239
+ order: Order
240
+ }
241
+
242
+ """
243
+ Autogenerated input type of CompleteCheckout
244
+ """
245
+ input CompleteCheckoutInput {
246
+ """
247
+ A unique identifier for the client performing the mutation.
248
+ """
249
+ clientMutationId: String
250
+ }
251
+
252
+ """
253
+ Autogenerated return type of CompleteCheckout
254
+ """
255
+ type CompleteCheckoutPayload {
256
+ """
257
+ A unique identifier for the client performing the mutation.
258
+ """
259
+ clientMutationId: String
260
+ errors: [UserError!]!
261
+ order: Order
262
+ }
263
+
264
+ """
265
+ Country.
266
+ """
267
+ type Country implements Node {
268
+ createdAt: ISO8601DateTime
269
+ id: ID!
270
+ iso: String!
271
+ iso3: String!
272
+ isoName: String!
273
+ name: String!
274
+ numcode: Int!
275
+ states(
276
+ """
277
+ Returns the elements in the list that come after the specified cursor.
278
+ """
279
+ after: String
280
+
281
+ """
282
+ Returns the elements in the list that come before the specified cursor.
283
+ """
284
+ before: String
285
+
286
+ """
287
+ Returns the first _n_ elements from the list.
288
+ """
289
+ first: Int
290
+
291
+ """
292
+ Returns the last _n_ elements from the list.
293
+ """
294
+ last: Int
295
+ ): StateConnection!
296
+ statesRequired: Boolean!
297
+ updatedAt: ISO8601DateTime
298
+ }
299
+
300
+ """
301
+ The connection type for Country.
302
+ """
303
+ type CountryConnection {
304
+ """
305
+ A list of edges.
306
+ """
307
+ edges: [CountryEdge]
308
+
309
+ """
310
+ A list of nodes.
311
+ """
312
+ nodes: [Country]
313
+
314
+ """
315
+ Information to aid in pagination.
316
+ """
317
+ pageInfo: PageInfo!
318
+ }
319
+
320
+ """
321
+ An edge in a connection.
322
+ """
323
+ type CountryEdge {
324
+ """
325
+ A cursor for use in pagination.
326
+ """
327
+ cursor: String!
328
+
329
+ """
330
+ The item at the end of the edge.
331
+ """
332
+ node: Country
333
+ }
334
+
335
+ """
336
+ Autogenerated input type of CreateOrder
337
+ """
338
+ input CreateOrderInput {
339
+ """
340
+ A unique identifier for the client performing the mutation.
341
+ """
342
+ clientMutationId: String
343
+ }
344
+
345
+ """
346
+ Autogenerated return type of CreateOrder
347
+ """
348
+ type CreateOrderPayload {
349
+ """
350
+ A unique identifier for the client performing the mutation.
351
+ """
352
+ clientMutationId: String
353
+ errors: [UserError!]!
354
+ order: Order
355
+ }
356
+
357
+ """
358
+ Credit Card.
359
+ """
360
+ type CreditCard implements Node & PaymentSource {
361
+ address: Address!
362
+ ccType: String
363
+ createdAt: ISO8601DateTime
364
+ id: ID!
365
+ lastDigits: String!
366
+ month: String!
367
+ name: String!
368
+ paymentMethod: PaymentMethod!
369
+ updatedAt: ISO8601DateTime
370
+ year: String!
371
+ }
372
+
373
+ """
374
+ Currency.
375
+ """
376
+ type Currency implements Node {
377
+ htmlEntity: String!
378
+ id: ID!
379
+ isoCode: String!
380
+ name: String!
381
+ symbol: String!
382
+ }
383
+
384
+ """
385
+ The connection type for Currency.
386
+ """
387
+ type CurrencyConnection {
388
+ """
389
+ A list of edges.
390
+ """
391
+ edges: [CurrencyEdge]
392
+
393
+ """
394
+ A list of nodes.
395
+ """
396
+ nodes: [Currency]
397
+
398
+ """
399
+ Information to aid in pagination.
400
+ """
401
+ pageInfo: PageInfo!
402
+ }
403
+
404
+ """
405
+ An edge in a connection.
406
+ """
407
+ type CurrencyEdge {
408
+ """
409
+ A cursor for use in pagination.
410
+ """
411
+ cursor: String!
412
+
413
+ """
414
+ The item at the end of the edge.
415
+ """
416
+ node: Currency
417
+ }
418
+
419
+ """
420
+ Autogenerated input type of EmptyCart
421
+ """
422
+ input EmptyCartInput {
423
+ """
424
+ A unique identifier for the client performing the mutation.
425
+ """
426
+ clientMutationId: String
427
+ }
428
+
429
+ """
430
+ Autogenerated return type of EmptyCart
431
+ """
432
+ type EmptyCartPayload {
433
+ """
434
+ A unique identifier for the client performing the mutation.
435
+ """
436
+ clientMutationId: String
437
+ errors: [UserError!]!
438
+ order: Order
439
+ }
440
+
441
+ """
442
+ An ISO 8601-encoded datetime
443
+ """
444
+ scalar ISO8601DateTime
445
+
446
+ """
447
+ Image.
448
+ """
449
+ type Image implements Node {
450
+ alt: String
451
+ createdAt: ISO8601DateTime
452
+ filename: String!
453
+ id: ID!
454
+ largeUrl: String!
455
+ miniUrl: String!
456
+ position: Int!
457
+ productUrl: String!
458
+ smallUrl: String!
459
+ updatedAt: ISO8601DateTime
460
+ }
461
+
462
+ """
463
+ The connection type for Image.
464
+ """
465
+ type ImageConnection {
466
+ """
467
+ A list of edges.
468
+ """
469
+ edges: [ImageEdge]
470
+
471
+ """
472
+ A list of nodes.
473
+ """
474
+ nodes: [Image]
475
+
476
+ """
477
+ Information to aid in pagination.
478
+ """
479
+ pageInfo: PageInfo!
480
+ }
481
+
482
+ """
483
+ An edge in a connection.
484
+ """
485
+ type ImageEdge {
486
+ """
487
+ A cursor for use in pagination.
488
+ """
489
+ cursor: String!
490
+
491
+ """
492
+ The item at the end of the edge.
493
+ """
494
+ node: Image
495
+ }
496
+
497
+ """
498
+ Represents untyped JSON
499
+ """
500
+ scalar Json
501
+
502
+ """
503
+ Line item.
504
+ """
505
+ type LineItem implements Node {
506
+ additionalTaxTotal: Float!
507
+ adjustmentTotal: Float!
508
+ amount: Float!
509
+ createdAt: ISO8601DateTime
510
+ currency: String!
511
+ hasSufficientStock: Boolean!
512
+ id: ID!
513
+ includedTaxTotal: Float!
514
+ price: Float!
515
+ promoTotal: Float!
516
+ quantity: Int!
517
+ updatedAt: ISO8601DateTime
518
+ variant: Variant!
519
+ }
520
+
521
+ """
522
+ The connection type for LineItem.
523
+ """
524
+ type LineItemConnection {
525
+ """
526
+ A list of edges.
527
+ """
528
+ edges: [LineItemEdge]
529
+
530
+ """
531
+ A list of nodes.
532
+ """
533
+ nodes: [LineItem]
534
+
535
+ """
536
+ Information to aid in pagination.
537
+ """
538
+ pageInfo: PageInfo!
539
+ }
540
+
541
+ """
542
+ An edge in a connection.
543
+ """
544
+ type LineItemEdge {
545
+ """
546
+ A cursor for use in pagination.
547
+ """
548
+ cursor: String!
549
+
550
+ """
551
+ The item at the end of the edge.
552
+ """
553
+ node: LineItem
554
+ }
555
+
556
+ """
557
+ Shipping Manifest Item.
558
+ """
559
+ type ManifestItem {
560
+ quantity: Int!
561
+ variant: Variant!
562
+ }
563
+
564
+ """
565
+ Autogenerated input type of MarkDefaultAddress
566
+ """
567
+ input MarkDefaultAddressInput {
568
+ addressId: ID!
569
+
570
+ """
571
+ A unique identifier for the client performing the mutation.
572
+ """
573
+ clientMutationId: String
574
+ }
575
+
576
+ """
577
+ Autogenerated return type of MarkDefaultAddress
578
+ """
579
+ type MarkDefaultAddressPayload {
580
+ """
581
+ A unique identifier for the client performing the mutation.
582
+ """
583
+ clientMutationId: String
584
+ user: User
585
+ }
586
+
587
+ type Mutation {
588
+ addAddressesToCheckout(input: AddAddressesToCheckoutInput!): AddAddressesToCheckoutPayload
589
+ addPaymentToCheckout(input: AddPaymentToCheckoutInput!): AddPaymentToCheckoutPayload
590
+ addToCart(input: AddToCartInput!): AddToCartPayload
591
+ advanceCheckout(input: AdvanceCheckoutInput!): AdvanceCheckoutPayload
592
+ applyCouponCode(input: ApplyCouponCodeInput!): ApplyCouponCodePayload
593
+ completeCheckout(input: CompleteCheckoutInput!): CompleteCheckoutPayload
594
+ createOrder(input: CreateOrderInput!): CreateOrderPayload
595
+ emptyCart(input: EmptyCartInput!): EmptyCartPayload
596
+ markDefaultAddress(input: MarkDefaultAddressInput!): MarkDefaultAddressPayload
597
+ nextCheckoutState(input: NextCheckoutStateInput!): NextCheckoutStatePayload
598
+ removeFromAddressBook(input: RemoveFromAddressBookInput!): RemoveFromAddressBookPayload
599
+ removeFromCart(input: RemoveFromCartInput!): RemoveFromCartPayload
600
+ saveInAddressBook(input: SaveInAddressBookInput!): SaveInAddressBookPayload
601
+ selectShippingRate(input: SelectShippingRateInput!): SelectShippingRatePayload
602
+ setOrderEmail(input: SetOrderEmailInput!): SetOrderEmailPayload
603
+ updateCartQuantity(input: UpdateCartQuantityInput!): UpdateCartQuantityPayload
604
+ }
605
+
606
+ """
607
+ Autogenerated input type of NextCheckoutState
608
+ """
609
+ input NextCheckoutStateInput {
610
+ """
611
+ A unique identifier for the client performing the mutation.
612
+ """
613
+ clientMutationId: String
614
+ }
615
+
616
+ """
617
+ Autogenerated return type of NextCheckoutState
618
+ """
619
+ type NextCheckoutStatePayload {
620
+ """
621
+ A unique identifier for the client performing the mutation.
622
+ """
623
+ clientMutationId: String
624
+ errors: [UserError!]!
625
+ order: Order
626
+ }
627
+
628
+ """
629
+ An object with an ID.
630
+ """
631
+ interface Node {
632
+ """
633
+ ID of the object.
634
+ """
635
+ id: ID!
636
+ }
637
+
638
+ """
639
+ OptionType Type.
640
+ """
641
+ type OptionType implements Node {
642
+ createdAt: ISO8601DateTime
643
+ id: ID!
644
+ name: String!
645
+ optionValues(
646
+ """
647
+ Returns the elements in the list that come after the specified cursor.
648
+ """
649
+ after: String
650
+
651
+ """
652
+ Returns the elements in the list that come before the specified cursor.
653
+ """
654
+ before: String
655
+
656
+ """
657
+ Returns the first _n_ elements from the list.
658
+ """
659
+ first: Int
660
+
661
+ """
662
+ Returns the last _n_ elements from the list.
663
+ """
664
+ last: Int
665
+ ): OptionValueConnection!
666
+ position: Int!
667
+ presentation: String!
668
+ updatedAt: ISO8601DateTime
669
+ }
670
+
671
+ """
672
+ The connection type for OptionType.
673
+ """
674
+ type OptionTypeConnection {
675
+ """
676
+ A list of edges.
677
+ """
678
+ edges: [OptionTypeEdge]
679
+
680
+ """
681
+ A list of nodes.
682
+ """
683
+ nodes: [OptionType]
684
+
685
+ """
686
+ Information to aid in pagination.
687
+ """
688
+ pageInfo: PageInfo!
689
+ }
690
+
691
+ """
692
+ An edge in a connection.
693
+ """
694
+ type OptionTypeEdge {
695
+ """
696
+ A cursor for use in pagination.
697
+ """
698
+ cursor: String!
699
+
700
+ """
701
+ The item at the end of the edge.
702
+ """
703
+ node: OptionType
704
+ }
705
+
706
+ """
707
+ OptionValue.
708
+ """
709
+ type OptionValue implements Node {
710
+ createdAt: ISO8601DateTime
711
+ id: ID!
712
+ name: String!
713
+ position: String!
714
+ presentation: String!
715
+ updatedAt: ISO8601DateTime
716
+ }
717
+
718
+ """
719
+ The connection type for OptionValue.
720
+ """
721
+ type OptionValueConnection {
722
+ """
723
+ A list of edges.
724
+ """
725
+ edges: [OptionValueEdge]
726
+
727
+ """
728
+ A list of nodes.
729
+ """
730
+ nodes: [OptionValue]
731
+
732
+ """
733
+ Information to aid in pagination.
734
+ """
735
+ pageInfo: PageInfo!
736
+ }
737
+
738
+ """
739
+ An edge in a connection.
740
+ """
741
+ type OptionValueEdge {
742
+ """
743
+ A cursor for use in pagination.
744
+ """
745
+ cursor: String!
746
+
747
+ """
748
+ The item at the end of the edge.
749
+ """
750
+ node: OptionValue
751
+ }
752
+
753
+ """
754
+ Order.
755
+ """
756
+ type Order implements Node {
757
+ additionalTaxTotal: String!
758
+ adjustmentTotal: String!
759
+ adjustments(
760
+ """
761
+ Returns the elements in the list that come after the specified cursor.
762
+ """
763
+ after: String
764
+
765
+ """
766
+ Returns the elements in the list that come before the specified cursor.
767
+ """
768
+ before: String
769
+
770
+ """
771
+ Returns the first _n_ elements from the list.
772
+ """
773
+ first: Int
774
+
775
+ """
776
+ Returns the last _n_ elements from the list.
777
+ """
778
+ last: Int
779
+ ): AdjustmentConnection!
780
+ approvedAt: ISO8601DateTime
781
+ availablePaymentMethods: [PaymentMethod!]!
782
+ billingAddress: Address
783
+ canceledAt: ISO8601DateTime
784
+ completedAt: ISO8601DateTime
785
+ confirmationDelivered: Boolean!
786
+ createdAt: ISO8601DateTime
787
+ currency: String!
788
+ email: String
789
+ guestToken: String
790
+ id: ID!
791
+ includedTaxTotal: String!
792
+ itemTotal: String!
793
+ lineItems(
794
+ """
795
+ Returns the elements in the list that come after the specified cursor.
796
+ """
797
+ after: String
798
+
799
+ """
800
+ Returns the elements in the list that come before the specified cursor.
801
+ """
802
+ before: String
803
+
804
+ """
805
+ Returns the first _n_ elements from the list.
806
+ """
807
+ first: Int
808
+
809
+ """
810
+ Returns the last _n_ elements from the list.
811
+ """
812
+ last: Int
813
+ ): LineItemConnection!
814
+ number: String!
815
+ paymentState: String!
816
+ paymentTotal: String!
817
+ payments: [Payment!]!
818
+ promoTotal: String!
819
+ shipmentState: String!
820
+ shipmentTotal: String!
821
+ shipments(
822
+ """
823
+ Returns the elements in the list that come after the specified cursor.
824
+ """
825
+ after: String
826
+
827
+ """
828
+ Returns the elements in the list that come before the specified cursor.
829
+ """
830
+ before: String
831
+
832
+ """
833
+ Returns the first _n_ elements from the list.
834
+ """
835
+ first: Int
836
+
837
+ """
838
+ Returns the last _n_ elements from the list.
839
+ """
840
+ last: Int
841
+ ): ShipmentConnection!
842
+ shippingAddress: Address
843
+ specialInstructions: String
844
+ state: String!
845
+ total: String!
846
+ updatedAt: ISO8601DateTime
847
+ }
848
+
849
+ """
850
+ The connection type for Order.
851
+ """
852
+ type OrderConnection {
853
+ """
854
+ A list of edges.
855
+ """
856
+ edges: [OrderEdge]
857
+
858
+ """
859
+ A list of nodes.
860
+ """
861
+ nodes: [Order]
862
+
863
+ """
864
+ Information to aid in pagination.
865
+ """
866
+ pageInfo: PageInfo!
867
+ }
868
+
869
+ """
870
+ An edge in a connection.
871
+ """
872
+ type OrderEdge {
873
+ """
874
+ A cursor for use in pagination.
875
+ """
876
+ cursor: String!
877
+
878
+ """
879
+ The item at the end of the edge.
880
+ """
881
+ node: Order
882
+ }
883
+
884
+ """
885
+ Information about pagination in a connection.
886
+ """
887
+ type PageInfo {
888
+ """
889
+ When paginating forwards, the cursor to continue.
890
+ """
891
+ endCursor: String
892
+
893
+ """
894
+ When paginating forwards, are there more items?
895
+ """
896
+ hasNextPage: Boolean!
897
+
898
+ """
899
+ When paginating backwards, are there more items?
900
+ """
901
+ hasPreviousPage: Boolean!
902
+
903
+ """
904
+ When paginating backwards, the cursor to continue.
905
+ """
906
+ startCursor: String
907
+ }
908
+
909
+ """
910
+ Payment.
911
+ """
912
+ type Payment implements Node {
913
+ amount: String
914
+ createdAt: ISO8601DateTime
915
+ id: ID!
916
+ paymentSource: PaymentSource
917
+ state: String!
918
+ updatedAt: ISO8601DateTime
919
+ }
920
+
921
+ """
922
+ Payment Method.
923
+ """
924
+ type PaymentMethod implements Node {
925
+ createdAt: ISO8601DateTime
926
+ description: String
927
+ id: ID!
928
+ name: String!
929
+ position: String!
930
+ updatedAt: ISO8601DateTime
931
+ }
932
+
933
+ """
934
+ Payment Source.
935
+ """
936
+ interface PaymentSource {
937
+ createdAt: ISO8601DateTime
938
+ paymentMethod: PaymentMethod!
939
+ updatedAt: ISO8601DateTime
940
+ }
941
+
942
+ """
943
+ Price.
944
+ """
945
+ type Price implements Node {
946
+ amount: String!
947
+ countryIso: String
948
+ createdAt: ISO8601DateTime
949
+ currency: Currency!
950
+ displayAmount: String!
951
+ displayCountry: String!
952
+ id: ID!
953
+ updatedAt: ISO8601DateTime
954
+ }
955
+
956
+ """
957
+ The connection type for Price.
958
+ """
959
+ type PriceConnection {
960
+ """
961
+ A list of edges.
962
+ """
963
+ edges: [PriceEdge]
964
+
965
+ """
966
+ A list of nodes.
967
+ """
968
+ nodes: [Price]
969
+
970
+ """
971
+ Information to aid in pagination.
972
+ """
973
+ pageInfo: PageInfo!
974
+ }
975
+
976
+ """
977
+ An edge in a connection.
978
+ """
979
+ type PriceEdge {
980
+ """
981
+ A cursor for use in pagination.
982
+ """
983
+ cursor: String!
984
+
985
+ """
986
+ The item at the end of the edge.
987
+ """
988
+ node: Price
989
+ }
990
+
991
+ """
992
+ Product.
993
+ """
994
+ type Product implements Node {
995
+ createdAt: ISO8601DateTime
996
+ description: String
997
+ id: ID!
998
+ masterVariant: Variant!
999
+ metaDescription: String
1000
+ metaKeywords: String
1001
+ metaTitle: String
1002
+ name: String!
1003
+ optionTypes(
1004
+ """
1005
+ Returns the elements in the list that come after the specified cursor.
1006
+ """
1007
+ after: String
1008
+
1009
+ """
1010
+ Returns the elements in the list that come before the specified cursor.
1011
+ """
1012
+ before: String
1013
+
1014
+ """
1015
+ Returns the first _n_ elements from the list.
1016
+ """
1017
+ first: Int
1018
+
1019
+ """
1020
+ Returns the last _n_ elements from the list.
1021
+ """
1022
+ last: Int
1023
+ ): OptionTypeConnection!
1024
+ productProperties(
1025
+ """
1026
+ Returns the elements in the list that come after the specified cursor.
1027
+ """
1028
+ after: String
1029
+
1030
+ """
1031
+ Returns the elements in the list that come before the specified cursor.
1032
+ """
1033
+ before: String
1034
+
1035
+ """
1036
+ Returns the first _n_ elements from the list.
1037
+ """
1038
+ first: Int
1039
+
1040
+ """
1041
+ Returns the last _n_ elements from the list.
1042
+ """
1043
+ last: Int
1044
+ ): ProductPropertyConnection!
1045
+ slug: String!
1046
+ updatedAt: ISO8601DateTime
1047
+ variants(
1048
+ """
1049
+ Returns the elements in the list that come after the specified cursor.
1050
+ """
1051
+ after: String
1052
+
1053
+ """
1054
+ Returns the elements in the list that come before the specified cursor.
1055
+ """
1056
+ before: String
1057
+
1058
+ """
1059
+ Returns the first _n_ elements from the list.
1060
+ """
1061
+ first: Int
1062
+
1063
+ """
1064
+ Returns the last _n_ elements from the list.
1065
+ """
1066
+ last: Int
1067
+ ): VariantConnection!
1068
+ }
1069
+
1070
+ """
1071
+ The connection type for Product.
1072
+ """
1073
+ type ProductConnection {
1074
+ """
1075
+ A list of edges.
1076
+ """
1077
+ edges: [ProductEdge]
1078
+
1079
+ """
1080
+ A list of nodes.
1081
+ """
1082
+ nodes: [Product]
1083
+
1084
+ """
1085
+ Information to aid in pagination.
1086
+ """
1087
+ pageInfo: PageInfo!
1088
+ }
1089
+
1090
+ """
1091
+ An edge in a connection.
1092
+ """
1093
+ type ProductEdge {
1094
+ """
1095
+ A cursor for use in pagination.
1096
+ """
1097
+ cursor: String!
1098
+
1099
+ """
1100
+ The item at the end of the edge.
1101
+ """
1102
+ node: Product
1103
+ }
1104
+
1105
+ """
1106
+ Product Property.
1107
+ """
1108
+ type ProductProperty implements Node {
1109
+ createdAt: ISO8601DateTime
1110
+ id: ID!
1111
+ position: Int!
1112
+ property: Property
1113
+ updatedAt: ISO8601DateTime
1114
+ value: String
1115
+ }
1116
+
1117
+ """
1118
+ The connection type for ProductProperty.
1119
+ """
1120
+ type ProductPropertyConnection {
1121
+ """
1122
+ A list of edges.
1123
+ """
1124
+ edges: [ProductPropertyEdge]
1125
+
1126
+ """
1127
+ A list of nodes.
1128
+ """
1129
+ nodes: [ProductProperty]
1130
+
1131
+ """
1132
+ Information to aid in pagination.
1133
+ """
1134
+ pageInfo: PageInfo!
1135
+ }
1136
+
1137
+ """
1138
+ An edge in a connection.
1139
+ """
1140
+ type ProductPropertyEdge {
1141
+ """
1142
+ A cursor for use in pagination.
1143
+ """
1144
+ cursor: String!
1145
+
1146
+ """
1147
+ The item at the end of the edge.
1148
+ """
1149
+ node: ProductProperty
1150
+ }
1151
+
1152
+ """
1153
+ Params for searching products.
1154
+ """
1155
+ input ProductsQueryInput {
1156
+ """
1157
+ Keywords
1158
+ """
1159
+ keywords: String
1160
+
1161
+ """
1162
+ Search
1163
+ """
1164
+ search: Json
1165
+
1166
+ """
1167
+ Taxon
1168
+ """
1169
+ taxon: ID
1170
+ }
1171
+
1172
+ """
1173
+ PromotionAdjustment.
1174
+ """
1175
+ type PromotionAdjustment implements Adjustment & Node {
1176
+ amount: String!
1177
+ createdAt: ISO8601DateTime
1178
+ eligible: Boolean!
1179
+ id: ID!
1180
+ label: String!
1181
+ promotionCode: String
1182
+ updatedAt: ISO8601DateTime
1183
+ }
1184
+
1185
+ """
1186
+ Property.
1187
+ """
1188
+ type Property implements Node {
1189
+ createdAt: ISO8601DateTime
1190
+ id: ID!
1191
+ name: String!
1192
+ presentation: String!
1193
+ updatedAt: ISO8601DateTime
1194
+ }
1195
+
1196
+ type Query {
1197
+ """
1198
+ Customer Completed Orders.
1199
+ """
1200
+ completedOrders(
1201
+ """
1202
+ Returns the elements in the list that come after the specified cursor.
1203
+ """
1204
+ after: String
1205
+
1206
+ """
1207
+ Returns the elements in the list that come before the specified cursor.
1208
+ """
1209
+ before: String
1210
+
1211
+ """
1212
+ Returns the first _n_ elements from the list.
1213
+ """
1214
+ first: Int
1215
+
1216
+ """
1217
+ Returns the last _n_ elements from the list.
1218
+ """
1219
+ last: Int
1220
+ ): OrderConnection!
1221
+
1222
+ """
1223
+ Supported Countries.
1224
+ """
1225
+ countries(
1226
+ """
1227
+ Returns the elements in the list that come after the specified cursor.
1228
+ """
1229
+ after: String
1230
+
1231
+ """
1232
+ Returns the elements in the list that come before the specified cursor.
1233
+ """
1234
+ before: String
1235
+
1236
+ """
1237
+ Returns the first _n_ elements from the list.
1238
+ """
1239
+ first: Int
1240
+
1241
+ """
1242
+ Returns the last _n_ elements from the list.
1243
+ """
1244
+ last: Int
1245
+ ): CountryConnection!
1246
+
1247
+ """
1248
+ Current Order.
1249
+ """
1250
+ currentOrder: Order
1251
+
1252
+ """
1253
+ Current Store.
1254
+ """
1255
+ currentStore: Store
1256
+
1257
+ """
1258
+ Current logged User.
1259
+ """
1260
+ currentUser: User
1261
+
1262
+ """
1263
+ Fetches an object given its ID.
1264
+ """
1265
+ node(
1266
+ """
1267
+ ID of the object.
1268
+ """
1269
+ id: ID!
1270
+ ): Node
1271
+
1272
+ """
1273
+ Fetches a list of objects given a list of IDs.
1274
+ """
1275
+ nodes(
1276
+ """
1277
+ IDs of the objects.
1278
+ """
1279
+ ids: [ID!]!
1280
+ ): [Node]!
1281
+
1282
+ """
1283
+ Find a product by its slug.
1284
+ """
1285
+ productBySlug(slug: String!): Product
1286
+
1287
+ """
1288
+ Supported Products.
1289
+ """
1290
+ products(
1291
+ """
1292
+ Returns the elements in the list that come after the specified cursor.
1293
+ """
1294
+ after: String
1295
+
1296
+ """
1297
+ Returns the elements in the list that come before the specified cursor.
1298
+ """
1299
+ before: String
1300
+
1301
+ """
1302
+ Returns the first _n_ elements from the list.
1303
+ """
1304
+ first: Int
1305
+
1306
+ """
1307
+ Returns the last _n_ elements from the list.
1308
+ """
1309
+ last: Int
1310
+ query: ProductsQueryInput
1311
+ ): ProductConnection!
1312
+
1313
+ """
1314
+ Supported Taxonomies.
1315
+ """
1316
+ taxonomies(
1317
+ """
1318
+ Returns the elements in the list that come after the specified cursor.
1319
+ """
1320
+ after: String
1321
+
1322
+ """
1323
+ Returns the elements in the list that come before the specified cursor.
1324
+ """
1325
+ before: String
1326
+
1327
+ """
1328
+ Returns the first _n_ elements from the list.
1329
+ """
1330
+ first: Int
1331
+
1332
+ """
1333
+ Returns the last _n_ elements from the list.
1334
+ """
1335
+ last: Int
1336
+ ): TaxonomyConnection!
1337
+ }
1338
+
1339
+ """
1340
+ Autogenerated input type of RemoveFromAddressBook
1341
+ """
1342
+ input RemoveFromAddressBookInput {
1343
+ addressId: ID!
1344
+
1345
+ """
1346
+ A unique identifier for the client performing the mutation.
1347
+ """
1348
+ clientMutationId: String
1349
+ }
1350
+
1351
+ """
1352
+ Autogenerated return type of RemoveFromAddressBook
1353
+ """
1354
+ type RemoveFromAddressBookPayload {
1355
+ """
1356
+ A unique identifier for the client performing the mutation.
1357
+ """
1358
+ clientMutationId: String
1359
+ user: User
1360
+ }
1361
+
1362
+ """
1363
+ Autogenerated input type of RemoveFromCart
1364
+ """
1365
+ input RemoveFromCartInput {
1366
+ """
1367
+ A unique identifier for the client performing the mutation.
1368
+ """
1369
+ clientMutationId: String
1370
+ lineItemId: ID!
1371
+ }
1372
+
1373
+ """
1374
+ Autogenerated return type of RemoveFromCart
1375
+ """
1376
+ type RemoveFromCartPayload {
1377
+ """
1378
+ A unique identifier for the client performing the mutation.
1379
+ """
1380
+ clientMutationId: String
1381
+ errors: [UserError!]!
1382
+ order: Order
1383
+ }
1384
+
1385
+ """
1386
+ Autogenerated input type of SaveInAddressBook
1387
+ """
1388
+ input SaveInAddressBookInput {
1389
+ address: AddressInput!
1390
+
1391
+ """
1392
+ A unique identifier for the client performing the mutation.
1393
+ """
1394
+ clientMutationId: String
1395
+ default: Boolean
1396
+ }
1397
+
1398
+ """
1399
+ Autogenerated return type of SaveInAddressBook
1400
+ """
1401
+ type SaveInAddressBookPayload {
1402
+ """
1403
+ A unique identifier for the client performing the mutation.
1404
+ """
1405
+ clientMutationId: String
1406
+ errors: [UserError!]!
1407
+ user: User
1408
+ }
1409
+
1410
+ """
1411
+ Autogenerated input type of SelectShippingRate
1412
+ """
1413
+ input SelectShippingRateInput {
1414
+ """
1415
+ A unique identifier for the client performing the mutation.
1416
+ """
1417
+ clientMutationId: String
1418
+ shippingRateId: ID!
1419
+ }
1420
+
1421
+ """
1422
+ Autogenerated return type of SelectShippingRate
1423
+ """
1424
+ type SelectShippingRatePayload {
1425
+ """
1426
+ A unique identifier for the client performing the mutation.
1427
+ """
1428
+ clientMutationId: String
1429
+ errors: [UserError!]!
1430
+ order: Order
1431
+ }
1432
+
1433
+ """
1434
+ Autogenerated input type of SetOrderEmail
1435
+ """
1436
+ input SetOrderEmailInput {
1437
+ """
1438
+ A unique identifier for the client performing the mutation.
1439
+ """
1440
+ clientMutationId: String
1441
+ email: String!
1442
+ }
1443
+
1444
+ """
1445
+ Autogenerated return type of SetOrderEmail
1446
+ """
1447
+ type SetOrderEmailPayload {
1448
+ """
1449
+ A unique identifier for the client performing the mutation.
1450
+ """
1451
+ clientMutationId: String
1452
+ errors: [UserError!]!
1453
+ order: Order
1454
+ }
1455
+
1456
+ """
1457
+ Order Shipment.
1458
+ """
1459
+ type Shipment implements Node {
1460
+ createdAt: ISO8601DateTime
1461
+ id: ID!
1462
+ manifest: [ManifestItem!]!
1463
+ number: String!
1464
+ shippedAt: ISO8601DateTime
1465
+ shippingRates(
1466
+ """
1467
+ Returns the elements in the list that come after the specified cursor.
1468
+ """
1469
+ after: String
1470
+
1471
+ """
1472
+ Returns the elements in the list that come before the specified cursor.
1473
+ """
1474
+ before: String
1475
+
1476
+ """
1477
+ Returns the first _n_ elements from the list.
1478
+ """
1479
+ first: Int
1480
+
1481
+ """
1482
+ Returns the last _n_ elements from the list.
1483
+ """
1484
+ last: Int
1485
+ ): ShippingRateConnection!
1486
+ state: String!
1487
+ tracking: String
1488
+ trackingUrl: String
1489
+ updatedAt: ISO8601DateTime
1490
+ }
1491
+
1492
+ """
1493
+ The connection type for Shipment.
1494
+ """
1495
+ type ShipmentConnection {
1496
+ """
1497
+ A list of edges.
1498
+ """
1499
+ edges: [ShipmentEdge]
1500
+
1501
+ """
1502
+ A list of nodes.
1503
+ """
1504
+ nodes: [Shipment]
1505
+
1506
+ """
1507
+ Information to aid in pagination.
1508
+ """
1509
+ pageInfo: PageInfo!
1510
+ }
1511
+
1512
+ """
1513
+ An edge in a connection.
1514
+ """
1515
+ type ShipmentEdge {
1516
+ """
1517
+ A cursor for use in pagination.
1518
+ """
1519
+ cursor: String!
1520
+
1521
+ """
1522
+ The item at the end of the edge.
1523
+ """
1524
+ node: Shipment
1525
+ }
1526
+
1527
+ """
1528
+ Shipping Rate.
1529
+ """
1530
+ type ShippingRate implements Node {
1531
+ cost: String!
1532
+ createdAt: ISO8601DateTime
1533
+ currency: String!
1534
+ id: ID!
1535
+ selected: Boolean!
1536
+ updatedAt: ISO8601DateTime
1537
+ }
1538
+
1539
+ """
1540
+ The connection type for ShippingRate.
1541
+ """
1542
+ type ShippingRateConnection {
1543
+ """
1544
+ A list of edges.
1545
+ """
1546
+ edges: [ShippingRateEdge]
1547
+
1548
+ """
1549
+ A list of nodes.
1550
+ """
1551
+ nodes: [ShippingRate]
1552
+
1553
+ """
1554
+ Information to aid in pagination.
1555
+ """
1556
+ pageInfo: PageInfo!
1557
+ }
1558
+
1559
+ """
1560
+ An edge in a connection.
1561
+ """
1562
+ type ShippingRateEdge {
1563
+ """
1564
+ A cursor for use in pagination.
1565
+ """
1566
+ cursor: String!
1567
+
1568
+ """
1569
+ The item at the end of the edge.
1570
+ """
1571
+ node: ShippingRate
1572
+ }
1573
+
1574
+ """
1575
+ State.
1576
+ """
1577
+ type State implements Node {
1578
+ abbr: String!
1579
+ createdAt: ISO8601DateTime
1580
+ id: ID!
1581
+ name: String!
1582
+ updatedAt: ISO8601DateTime
1583
+ }
1584
+
1585
+ """
1586
+ The connection type for State.
1587
+ """
1588
+ type StateConnection {
1589
+ """
1590
+ A list of edges.
1591
+ """
1592
+ edges: [StateEdge]
1593
+
1594
+ """
1595
+ A list of nodes.
1596
+ """
1597
+ nodes: [State]
1598
+
1599
+ """
1600
+ Information to aid in pagination.
1601
+ """
1602
+ pageInfo: PageInfo!
1603
+ }
1604
+
1605
+ """
1606
+ An edge in a connection.
1607
+ """
1608
+ type StateEdge {
1609
+ """
1610
+ A cursor for use in pagination.
1611
+ """
1612
+ cursor: String!
1613
+
1614
+ """
1615
+ The item at the end of the edge.
1616
+ """
1617
+ node: State
1618
+ }
1619
+
1620
+ """
1621
+ Store.
1622
+ """
1623
+ type Store implements Node {
1624
+ cartTaxCountryIso: String
1625
+ code: String!
1626
+ createdAt: ISO8601DateTime
1627
+ currencies(
1628
+ """
1629
+ Returns the elements in the list that come after the specified cursor.
1630
+ """
1631
+ after: String
1632
+
1633
+ """
1634
+ Returns the elements in the list that come before the specified cursor.
1635
+ """
1636
+ before: String
1637
+
1638
+ """
1639
+ Returns the first _n_ elements from the list.
1640
+ """
1641
+ first: Int
1642
+
1643
+ """
1644
+ Returns the last _n_ elements from the list.
1645
+ """
1646
+ last: Int
1647
+ ): CurrencyConnection!
1648
+ default: Boolean!
1649
+ defaultCurrency: String
1650
+ id: ID!
1651
+ mailFromAddress: String!
1652
+ metaDescription: String
1653
+ metaKeywords: String
1654
+ name: String!
1655
+ seoTitle: String
1656
+ updatedAt: ISO8601DateTime
1657
+ url: String!
1658
+ }
1659
+
1660
+ """
1661
+ TaxAdjustment.
1662
+ """
1663
+ type TaxAdjustment implements Adjustment & Node {
1664
+ amount: String!
1665
+ createdAt: ISO8601DateTime
1666
+ eligible: Boolean!
1667
+ id: ID!
1668
+ label: String!
1669
+ updatedAt: ISO8601DateTime
1670
+ }
1671
+
1672
+ """
1673
+ Taxon.
1674
+ """
1675
+ type Taxon implements Node {
1676
+ children(
1677
+ """
1678
+ Returns the elements in the list that come after the specified cursor.
1679
+ """
1680
+ after: String
1681
+
1682
+ """
1683
+ Returns the elements in the list that come before the specified cursor.
1684
+ """
1685
+ before: String
1686
+
1687
+ """
1688
+ Returns the first _n_ elements from the list.
1689
+ """
1690
+ first: Int
1691
+
1692
+ """
1693
+ Returns the last _n_ elements from the list.
1694
+ """
1695
+ last: Int
1696
+ ): TaxonConnection
1697
+ createdAt: ISO8601DateTime
1698
+ description: String
1699
+ iconUrl: String
1700
+ id: ID!
1701
+ metaDescription: String
1702
+ metaKeywords: String
1703
+ metaTitle: String
1704
+ name: String!
1705
+ parentTaxon: Taxon
1706
+ permalink: String!
1707
+ updatedAt: ISO8601DateTime
1708
+ }
1709
+
1710
+ """
1711
+ The connection type for Taxon.
1712
+ """
1713
+ type TaxonConnection {
1714
+ """
1715
+ A list of edges.
1716
+ """
1717
+ edges: [TaxonEdge]
1718
+
1719
+ """
1720
+ A list of nodes.
1721
+ """
1722
+ nodes: [Taxon]
1723
+
1724
+ """
1725
+ Information to aid in pagination.
1726
+ """
1727
+ pageInfo: PageInfo!
1728
+ }
1729
+
1730
+ """
1731
+ An edge in a connection.
1732
+ """
1733
+ type TaxonEdge {
1734
+ """
1735
+ A cursor for use in pagination.
1736
+ """
1737
+ cursor: String!
1738
+
1739
+ """
1740
+ The item at the end of the edge.
1741
+ """
1742
+ node: Taxon
1743
+ }
1744
+
1745
+ """
1746
+ Taxonomy.
1747
+ """
1748
+ type Taxonomy implements Node {
1749
+ createdAt: ISO8601DateTime
1750
+ id: ID!
1751
+ name: String!
1752
+ rootTaxon: Taxon
1753
+ taxons(
1754
+ """
1755
+ Returns the elements in the list that come after the specified cursor.
1756
+ """
1757
+ after: String
1758
+
1759
+ """
1760
+ Returns the elements in the list that come before the specified cursor.
1761
+ """
1762
+ before: String
1763
+
1764
+ """
1765
+ Returns the first _n_ elements from the list.
1766
+ """
1767
+ first: Int
1768
+
1769
+ """
1770
+ Returns the last _n_ elements from the list.
1771
+ """
1772
+ last: Int
1773
+ ): TaxonConnection!
1774
+ updatedAt: ISO8601DateTime
1775
+ }
1776
+
1777
+ """
1778
+ The connection type for Taxonomy.
1779
+ """
1780
+ type TaxonomyConnection {
1781
+ """
1782
+ A list of edges.
1783
+ """
1784
+ edges: [TaxonomyEdge]
1785
+
1786
+ """
1787
+ A list of nodes.
1788
+ """
1789
+ nodes: [Taxonomy]
1790
+
1791
+ """
1792
+ Information to aid in pagination.
1793
+ """
1794
+ pageInfo: PageInfo!
1795
+ }
1796
+
1797
+ """
1798
+ An edge in a connection.
1799
+ """
1800
+ type TaxonomyEdge {
1801
+ """
1802
+ A cursor for use in pagination.
1803
+ """
1804
+ cursor: String!
1805
+
1806
+ """
1807
+ The item at the end of the edge.
1808
+ """
1809
+ node: Taxonomy
1810
+ }
1811
+
1812
+ """
1813
+ Autogenerated input type of UpdateCartQuantity
1814
+ """
1815
+ input UpdateCartQuantityInput {
1816
+ """
1817
+ A unique identifier for the client performing the mutation.
1818
+ """
1819
+ clientMutationId: String
1820
+ lineItemId: ID!
1821
+ quantity: Int!
1822
+ }
1823
+
1824
+ """
1825
+ Autogenerated return type of UpdateCartQuantity
1826
+ """
1827
+ type UpdateCartQuantityPayload {
1828
+ """
1829
+ A unique identifier for the client performing the mutation.
1830
+ """
1831
+ clientMutationId: String
1832
+ errors: [UserError!]!
1833
+ order: Order
1834
+ }
1835
+
1836
+ """
1837
+ User.
1838
+ """
1839
+ type User implements Node {
1840
+ addresses(
1841
+ """
1842
+ Returns the elements in the list that come after the specified cursor.
1843
+ """
1844
+ after: String
1845
+
1846
+ """
1847
+ Returns the elements in the list that come before the specified cursor.
1848
+ """
1849
+ before: String
1850
+
1851
+ """
1852
+ Returns the first _n_ elements from the list.
1853
+ """
1854
+ first: Int
1855
+
1856
+ """
1857
+ Returns the last _n_ elements from the list.
1858
+ """
1859
+ last: Int
1860
+ ): AddressConnection!
1861
+ billAddress: Address
1862
+ createdAt: ISO8601DateTime
1863
+ currentSignInAt: ISO8601DateTime
1864
+ defaultAddress: Address
1865
+ email: String!
1866
+ id: ID!
1867
+ lastSignInAt: ISO8601DateTime
1868
+ login: String
1869
+ shipAddress: Address
1870
+ signInCount: Int!
1871
+ spreeApiKey: String
1872
+ updatedAt: ISO8601DateTime
1873
+ wallet(
1874
+ """
1875
+ Returns the elements in the list that come after the specified cursor.
1876
+ """
1877
+ after: String
1878
+
1879
+ """
1880
+ Returns the elements in the list that come before the specified cursor.
1881
+ """
1882
+ before: String
1883
+
1884
+ """
1885
+ Returns the first _n_ elements from the list.
1886
+ """
1887
+ first: Int
1888
+
1889
+ """
1890
+ Returns the last _n_ elements from the list.
1891
+ """
1892
+ last: Int
1893
+ ): WalletPaymentSourceConnection!
1894
+ }
1895
+
1896
+ """
1897
+ A user-readable error
1898
+ """
1899
+ type UserError {
1900
+ """
1901
+ A description of the error
1902
+ """
1903
+ message: String!
1904
+
1905
+ """
1906
+ Which input value this error came from
1907
+ """
1908
+ path: [String!]
1909
+ }
1910
+
1911
+ """
1912
+ Variant.
1913
+ """
1914
+ type Variant implements Node {
1915
+ createdAt: ISO8601DateTime
1916
+ defaultPrice: Price!
1917
+ depth: String
1918
+ height: String
1919
+ id: ID!
1920
+ images(
1921
+ """
1922
+ Returns the elements in the list that come after the specified cursor.
1923
+ """
1924
+ after: String
1925
+
1926
+ """
1927
+ Returns the elements in the list that come before the specified cursor.
1928
+ """
1929
+ before: String
1930
+
1931
+ """
1932
+ Returns the first _n_ elements from the list.
1933
+ """
1934
+ first: Int
1935
+
1936
+ """
1937
+ Returns the last _n_ elements from the list.
1938
+ """
1939
+ last: Int
1940
+ ): ImageConnection!
1941
+ isMaster: Boolean!
1942
+ optionValues(
1943
+ """
1944
+ Returns the elements in the list that come after the specified cursor.
1945
+ """
1946
+ after: String
1947
+
1948
+ """
1949
+ Returns the elements in the list that come before the specified cursor.
1950
+ """
1951
+ before: String
1952
+
1953
+ """
1954
+ Returns the first _n_ elements from the list.
1955
+ """
1956
+ first: Int
1957
+
1958
+ """
1959
+ Returns the last _n_ elements from the list.
1960
+ """
1961
+ last: Int
1962
+ ): OptionValueConnection!
1963
+ position: Int!
1964
+ prices(
1965
+ """
1966
+ Returns the elements in the list that come after the specified cursor.
1967
+ """
1968
+ after: String
1969
+
1970
+ """
1971
+ Returns the elements in the list that come before the specified cursor.
1972
+ """
1973
+ before: String
1974
+
1975
+ """
1976
+ Returns the first _n_ elements from the list.
1977
+ """
1978
+ first: Int
1979
+
1980
+ """
1981
+ Returns the last _n_ elements from the list.
1982
+ """
1983
+ last: Int
1984
+ ): PriceConnection!
1985
+ sku: String!
1986
+ updatedAt: ISO8601DateTime
1987
+ weight: String!
1988
+ width: String
1989
+ }
1990
+
1991
+ """
1992
+ The connection type for Variant.
1993
+ """
1994
+ type VariantConnection {
1995
+ """
1996
+ A list of edges.
1997
+ """
1998
+ edges: [VariantEdge]
1999
+
2000
+ """
2001
+ A list of nodes.
2002
+ """
2003
+ nodes: [Variant]
2004
+
2005
+ """
2006
+ Information to aid in pagination.
2007
+ """
2008
+ pageInfo: PageInfo!
2009
+ }
2010
+
2011
+ """
2012
+ An edge in a connection.
2013
+ """
2014
+ type VariantEdge {
2015
+ """
2016
+ A cursor for use in pagination.
2017
+ """
2018
+ cursor: String!
2019
+
2020
+ """
2021
+ The item at the end of the edge.
2022
+ """
2023
+ node: Variant
2024
+ }
2025
+
2026
+ """
2027
+ Wallet Payment Source.
2028
+ """
2029
+ type WalletPaymentSource implements Node {
2030
+ createdAt: ISO8601DateTime
2031
+ default: Boolean!
2032
+ id: ID!
2033
+ paymentSource: PaymentSource
2034
+ updatedAt: ISO8601DateTime
2035
+ }
2036
+
2037
+ """
2038
+ The connection type for WalletPaymentSource.
2039
+ """
2040
+ type WalletPaymentSourceConnection {
2041
+ """
2042
+ A list of edges.
2043
+ """
2044
+ edges: [WalletPaymentSourceEdge]
2045
+
2046
+ """
2047
+ A list of nodes.
2048
+ """
2049
+ nodes: [WalletPaymentSource]
2050
+
2051
+ """
2052
+ Information to aid in pagination.
2053
+ """
2054
+ pageInfo: PageInfo!
2055
+ }
2056
+
2057
+ """
2058
+ An edge in a connection.
2059
+ """
2060
+ type WalletPaymentSourceEdge {
2061
+ """
2062
+ A cursor for use in pagination.
2063
+ """
2064
+ cursor: String!
2065
+
2066
+ """
2067
+ The item at the end of the edge.
2068
+ """
2069
+ node: WalletPaymentSource
2070
+ }