shopify_graphql 2.3.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9396a193dad0b344cca715ca90a406bc2dc53d49b4e806c9f8ba3b3469f83262
|
|
4
|
+
data.tar.gz: 77ebbd5224182e0b5c1410317dc20aff62e69485848012e7d45df3ea8a846cb9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0ad3c88dfd11e4fab39a69d84eb62e528b1f3bfe0c78efc4668c736bdec50055efbf091f2cc275ddf80c8f955b05aaf20d380a985c53937683d098559b9f197c
|
|
7
|
+
data.tar.gz: 2c91862377bb92d01fe6b00460ca14716cc334d5df0d88a5eecbaeefbcce9fa0a61053a1daa259d9bb70f73b821ba134623e01ca9cabe5f3a93d8d92224d77cf
|
|
@@ -72,7 +72,7 @@ module ShopifyGraphql
|
|
|
72
72
|
def call(with_locales: false)
|
|
73
73
|
query = prepare_query(QUERY, with_locales: with_locales)
|
|
74
74
|
response = execute(query)
|
|
75
|
-
parse_data(response
|
|
75
|
+
parse_data(response, with_locales: with_locales)
|
|
76
76
|
end
|
|
77
77
|
|
|
78
78
|
private
|
|
@@ -101,10 +101,11 @@ module ShopifyGraphql
|
|
|
101
101
|
query
|
|
102
102
|
end
|
|
103
103
|
|
|
104
|
-
def parse_data(
|
|
104
|
+
def parse_data(response, with_locales: false)
|
|
105
|
+
data = response.data
|
|
105
106
|
plan_display_name = ShopifyGraphql.normalize_plan_display_name(data.shop.plan.displayName)
|
|
106
107
|
plan_name = ShopifyGraphql::DISPLAY_NAME_TO_PLAN[plan_display_name]
|
|
107
|
-
|
|
108
|
+
shop_data = OpenStruct.new(
|
|
108
109
|
id: data.shop.id.split("/").last.to_i,
|
|
109
110
|
name: data.shop.name,
|
|
110
111
|
email: data.shop.email,
|
|
@@ -145,13 +146,14 @@ module ShopifyGraphql
|
|
|
145
146
|
marketing_sms_consent_enabled_at_checkout: data.shop.marketingSmsConsentEnabledAtCheckout,
|
|
146
147
|
max_product_options: data.shop.resourceLimits.maxProductOptions,
|
|
147
148
|
max_product_variants: data.shop.resourceLimits.maxProductVariants,
|
|
148
|
-
unified_markets: !!data.shop&.features&.unifiedMarkets
|
|
149
|
+
unified_markets: !!data.shop&.features&.unifiedMarkets,
|
|
150
|
+
graphql_points_limit: response.points_limit
|
|
149
151
|
)
|
|
150
152
|
if with_locales
|
|
151
|
-
|
|
152
|
-
|
|
153
|
+
shop_data.primary_locale = data.shopLocales.find(&:primary).locale
|
|
154
|
+
shop_data.shop_locales = data.shopLocales.map(&:locale)
|
|
153
155
|
end
|
|
154
|
-
|
|
156
|
+
shop_data
|
|
155
157
|
end
|
|
156
158
|
end
|
|
157
159
|
end
|
|
@@ -110,6 +110,8 @@ module ShopifyGraphql
|
|
|
110
110
|
TooManyRequests.new(response: response)
|
|
111
111
|
when "INTERNAL_SERVER_ERROR"
|
|
112
112
|
ServerError.new(response: response)
|
|
113
|
+
when "SHOP_PENDING_TERMINATION"
|
|
114
|
+
ShopPendingTermination.new(response: response)
|
|
113
115
|
else
|
|
114
116
|
ConnectionError.new(response: response)
|
|
115
117
|
end
|
|
@@ -65,6 +65,10 @@ module ShopifyGraphql
|
|
|
65
65
|
class ShopLocked < ClientError # :nodoc:
|
|
66
66
|
end
|
|
67
67
|
|
|
68
|
+
# GraphQL SHOP_PENDING_TERMINATION error code (shop is under review)
|
|
69
|
+
class ShopPendingTermination < ClientError # :nodoc:
|
|
70
|
+
end
|
|
71
|
+
|
|
68
72
|
# 429 Too Many Requests
|
|
69
73
|
class TooManyRequests < ClientError # :nodoc:
|
|
70
74
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shopify_graphql
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kirill Platonov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-07-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|