shopify_graphql 2.2.0 → 2.3.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 +4 -4
- data/app/graphql/shopify_graphql/current_shop.rb +13 -1
- data/lib/shopify_graphql/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1dcf31423f65e2bcac5f201e2e07d533a561b4bf90e7d00f9508f9f31664a290
|
4
|
+
data.tar.gz: e2ff7195b2b587e77ed14b1e1d359abbc298e0af79254600bb2182a6233c7c14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c351fb7bca4381c1e23efda72a58e13de53fd2c6a2e0ec83c1f6d86bf4a2aa24c73a74f8bc398cebbd737b8abb978bb6a438e1c1f5bd198ba79b7ce0ddf99a00
|
7
|
+
data.tar.gz: 2146ea9c66a8235668f12f8faadba74f77595834c882abb940617ab2bb15dc4bf53f800c4a01460e3afb9890d2803bb890ede8b627cd491da52a287ee2e130aa
|
@@ -52,6 +52,7 @@ module ShopifyGraphql
|
|
52
52
|
maxProductOptions
|
53
53
|
maxProductVariants
|
54
54
|
}
|
55
|
+
#FEATURES#
|
55
56
|
}
|
56
57
|
#LOCALES_SUBQUERY#
|
57
58
|
}
|
@@ -62,6 +63,11 @@ module ShopifyGraphql
|
|
62
63
|
primary
|
63
64
|
}
|
64
65
|
GRAPHQL
|
66
|
+
FEATURES_SUBQUERY = <<~GRAPHQL
|
67
|
+
features {
|
68
|
+
unifiedMarkets
|
69
|
+
}
|
70
|
+
GRAPHQL
|
65
71
|
|
66
72
|
def call(with_locales: false)
|
67
73
|
query = prepare_query(QUERY, with_locales: with_locales)
|
@@ -87,6 +93,11 @@ module ShopifyGraphql
|
|
87
93
|
query.gsub!("#UPDATED_AT#", "updatedAt")
|
88
94
|
query.gsub!("#SMS_CONSENT#", "marketingSmsConsentEnabledAtCheckout")
|
89
95
|
end
|
96
|
+
if ShopifyAPI::Context.api_version.in?(%w[2024-01 2024-04 2024-07 2024-10 2025-01])
|
97
|
+
query.gsub!("#FEATURES#", "")
|
98
|
+
else
|
99
|
+
query.gsub!("#FEATURES#", FEATURES_SUBQUERY)
|
100
|
+
end
|
90
101
|
query
|
91
102
|
end
|
92
103
|
|
@@ -133,7 +144,8 @@ module ShopifyGraphql
|
|
133
144
|
enabled_presentment_currencies: data.shop.enabledPresentmentCurrencies,
|
134
145
|
marketing_sms_consent_enabled_at_checkout: data.shop.marketingSmsConsentEnabledAtCheckout,
|
135
146
|
max_product_options: data.shop.resourceLimits.maxProductOptions,
|
136
|
-
max_product_variants: data.shop.resourceLimits.maxProductVariants
|
147
|
+
max_product_variants: data.shop.resourceLimits.maxProductVariants,
|
148
|
+
unified_markets: !!data.shop&.features&.unifiedMarkets
|
137
149
|
)
|
138
150
|
if with_locales
|
139
151
|
response.primary_locale = data.shopLocales.find(&:primary).locale
|
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.3.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: 2025-
|
11
|
+
date: 2025-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|