@@ -138,7 +138,7 @@ def unregister(topic:, session:)
138138 }
139139 MUTATION
140140
141- delete_response = client . query ( query : delete_mutation )
141+ delete_response = client . query ( query : delete_mutation , response_as_struct : false )
142142 raise Errors ::WebhookRegistrationError ,
143143 "Failed to delete webhook from Shopify" unless delete_response . ok?
144144 result = T . cast ( delete_response . body , T ::Hash [ String , T . untyped ] )
@@ -170,7 +170,7 @@ def get_webhook_id(topic:, client:)
170170 }
171171 QUERY
172172
173- fetch_id_response = client . query ( query : fetch_id_query )
173+ fetch_id_response = client . query ( query : fetch_id_query , response_as_struct : false )
174174 raise Errors ::WebhookRegistrationError ,
175175 "Failed to fetch webhook from Shopify" unless fetch_id_response . ok?
176176 body = T . cast ( fetch_id_response . body , T ::Hash [ String , T . untyped ] )
@@ -216,7 +216,7 @@ def process(request)
216216 ) . returns ( T ::Hash [ Symbol , T . untyped ] )
217217 end
218218 def webhook_registration_needed? ( client , registration )
219- check_response = client . query ( query : registration . build_check_query )
219+ check_response = client . query ( query : registration . build_check_query , response_as_struct : false )
220220 raise Errors ::WebhookRegistrationError ,
221221 "Failed to check if webhook was already registered" unless check_response . ok?
222222 parsed_check_result = registration . parse_check_result ( T . cast ( check_response . body , T ::Hash [ String , T . untyped ] ) )
@@ -233,7 +233,8 @@ def webhook_registration_needed?(client, registration)
233233 ) . returns ( T ::Hash [ String , T . untyped ] )
234234 end
235235 def send_register_request ( client , registration , webhook_id )
236- register_response = client . query ( query : registration . build_register_query ( webhook_id : webhook_id ) )
236+ register_response = client . query ( query : registration . build_register_query ( webhook_id : webhook_id ) ,
237+ response_as_struct : false )
237238
238239 raise Errors ::WebhookRegistrationError , "Failed to register webhook with Shopify" unless register_response . ok?
239240
0 commit comments