Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Update incorrect types in order (#6758)
Maciej Korycinski47293762ae0d
diff --git a/saleor/graphql/order/types.py b/saleor/graphql/order/types.pyindex d9c9b42f6b..6f73a8f1c2 100644--- a/saleor/graphql/order/types.py+++ b/saleor/graphql/order/types.py@@ -267,11 +267,12 @@ class OrderLine(CountableDjangoObjectType):size=graphene.Argument(graphene.Int, description="Size of thumbnail."),)unit_price = graphene.Field(- TaxedMoney, description="Price of the single item in the order line."+ TaxedMoney,+ description="Price of the single item in the order line.",+ required=True,)total_price = graphene.Field(- TaxedMoney,- description="Price of the order line.",+ TaxedMoney, description="Price of the order line.", required=True)variant = graphene.Field(ProductVariant,@@ -396,16 +397,26 @@ class Order(CountableDjangoObjectType):Invoice, required=False, description="List of order invoices.")number = graphene.String(description="User-friendly number of an order.")- is_paid = graphene.Boolean(description="Informs if an order is fully paid.")- payment_status = PaymentChargeStatusEnum(description="Internal payment status.")+ is_paid = graphene.Boolean(+ description="Informs if an order is fully paid.", required=True+ )+ payment_status = PaymentChargeStatusEnum(+ description="Internal payment status.", required=True+ )payment_status_display = graphene.String(- description="User-friendly payment status."+ description="User-friendly payment status.", required=True)payments = graphene.List(Payment, description="List of payments for the order.")- total = graphene.Field(TaxedMoney, description="Total amount of the order.")- shipping_price = graphene.Field(TaxedMoney, description="Total price of shipping.")+ total = graphene.Field(+ TaxedMoney, description="Total amount of the order.", required=True+ )+ shipping_price = graphene.Field(+ TaxedMoney, description="Total price of shipping.", required=True+ )subtotal = graphene.Field(- TaxedMoney, description="The sum of line prices not including shipping."+ TaxedMoney,+ description="The sum of line prices not including shipping.",+ required=True,)gift_cards = graphene.List(GiftCard, description="List of user gift cards.")status_display = graphene.String(description="User-friendly order status.")@@ -417,9 +428,11 @@ class Order(CountableDjangoObjectType):required=True,)total_authorized = graphene.Field(- Money, description="Amount authorized for the order."+ Money, description="Amount authorized for the order.", required=True+ )+ total_captured = graphene.Field(+ Money, description="Amount captured by payment.", required=True)- total_captured = graphene.Field(Money, description="Amount captured by payment.")events = graphene.List(OrderEvent, description="List of events associated with the order.")diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex 5a80bc3080..1b6ec980db 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -2837,7 +2837,7 @@ type Order implements Node & ObjectWithMetadata {shippingMethod: ShippingMethodshippingMethodName: Stringchannel: Channel!- shippingPrice: TaxedMoney+ shippingPrice: TaxedMoney!shippingTaxRate: Float!token: String!voucher: Voucher@@ -2857,16 +2857,16 @@ type Order implements Node & ObjectWithMetadata {availableShippingMethods: [ShippingMethod]invoices: [Invoice]number: String- isPaid: Boolean- paymentStatus: PaymentChargeStatusEnum- paymentStatusDisplay: String+ isPaid: Boolean!+ paymentStatus: PaymentChargeStatusEnum!+ paymentStatusDisplay: String!payments: [Payment]- total: TaxedMoney- subtotal: TaxedMoney+ total: TaxedMoney!+ subtotal: TaxedMoney!statusDisplay: StringcanFinalize: Boolean!- totalAuthorized: Money- totalCaptured: Money+ totalAuthorized: Money!+ totalCaptured: Money!events: [OrderEvent]totalBalance: Money!userEmail: String@@ -3109,8 +3109,8 @@ type OrderLine implements Node {taxRate: Float!digitalContentUrl: DigitalContentUrlthumbnail(size: Int): Image- unitPrice: TaxedMoney- totalPrice: TaxedMoney+ unitPrice: TaxedMoney!+ totalPrice: TaxedMoney!variant: ProductVarianttranslatedProductName: String!translatedVariantName: String!