Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add required=True, update schema
Michał Jelonekdca0d2e0872a
diff --git a/saleor/graphql/checkout/types.py b/saleor/graphql/checkout/types.pyindex 63a16772da..c356694304 100644--- a/saleor/graphql/checkout/types.py+++ b/saleor/graphql/checkout/types.py@@ -36,7 +36,7 @@ class CheckoutLine(CountableDjangoObjectType):class Checkout(CountableDjangoObjectType):available_shipping_methods = graphene.List(- ShippingMethod, required=False,+ ShippingMethod, required=True,description='Shipping methods that can be used with this order.')available_payment_gateways = graphene.List(PaymentGatewayEnum, description='List of available payment gateways.',diff --git a/saleor/graphql/core/mutations.py b/saleor/graphql/core/mutations.pyindex a7ffc0c56e..28329a58ca 100644--- a/saleor/graphql/core/mutations.py+++ b/saleor/graphql/core/mutations.py@@ -364,7 +364,7 @@ class CreateToken(ObtainJSONWebToken):the mutation works."""- errors = graphene.List(Error)+ errors = graphene.List(Error, required=True)user = graphene.Field(User)@classmethoddiff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex e89097b008..1c2a04b5d9 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -286,7 +286,7 @@ type Checkout implements Node {voucherCode: Stringlines: [CheckoutLine]id: ID!- availableShippingMethods: [ShippingMethod]+ availableShippingMethods: [ShippingMethod]!availablePaymentGateways: [GatewaysEnum]!isShippingRequired: Boolean!shippingPrice: TaxedMoney@@ -481,7 +481,7 @@ type CountryDisplay {type CreateToken {token: String- errors: [Error]+ errors: [Error]!user: User}