Shopify / mobile-buy-sdk-ios

Shopify’s Mobile Buy SDK makes it simple to sell physical products inside your mobile app. With a few lines of code, you can connect your app with the Shopify platform and let your users buy your products using Apple Pay or their credit card.
MIT License
452 stars 199 forks source link

CreateCheckout mutation / response issue #1076

Closed patelgaurav4u closed 4 years ago

patelgaurav4u commented 4 years ago

I am getting

discountApplication =                                 {
                                    "__typename" = AutomaticDiscountApplication;
                                };

check this mutation for createcheckout

mutation{checkoutCreate(input:{lineItems:[{quantity:1,variantId:"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zMTgyMzg3OTIwOTAzMg=="},{quantity:1,variantId:"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zMTgyMzg3OTU2OTQ4MA=="}],allowPartialAddresses:true}){checkoutUserErrors{field,message},checkout{id,ready,requiresShipping,taxesIncluded,email,order{id,orderNumber,totalPrice},discountApplications(first:250){edges{node{__typename,... on DiscountCodeApplication{applicable,code},... on ManualDiscountApplication{title},... on ScriptDiscountApplication{description}}}},shippingDiscountAllocations{allocatedAmount{amount,currencyCode},discountApplication{__typename,... on DiscountCodeApplication{applicable,code},... on ManualDiscountApplication{title},... on ScriptDiscountApplication{description}}},shippingAddress{firstName,lastName,phone,address1,address2,city,country,countryCodeV2,province,provinceCode,zip},shippingLine{handle,title,price},note,lineItems(first:250){edges{cursor,node{variant{id,price},title,quantity,id,discountAllocations{allocatedAmount{amount,currencyCode},discountApplication{__typename,... on DiscountCodeApplication{applicable,code},... on ManualDiscountApplication{title},... on ScriptDiscountApplication{description}}}}}},webUrl,currencyCode,subtotalPrice,totalTax,totalPrice,paymentDue}}}

patelgaurav4u commented 4 years ago

@dbart01 please look into this , this is facing in live application

patelgaurav4u commented 4 years ago

this is api version related issue.

osamie commented 4 years ago

Hello @patelgaurav4u 👋 What is the actual error you are seeing when you call createCheckout? And can you confirm what version of the sdk you're using?

patelgaurav4u commented 4 years ago

we got "__typename" in response even i have't pass in Query for DiscountApplicationQuery in SDK 3.3.2

dbart01 commented 4 years ago

This is not an issue.

patelgaurav4u commented 4 years ago

yes , i realize this things , but please update your demo code according the features