Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add enabled gateways to shop type in GraphQL
fowczarekab83a6192658
diff --git a/saleor/graphql/shop/types.py b/saleor/graphql/shop/types.pyindex b5abf085a7..119c15599b 100644--- a/saleor/graphql/shop/types.py+++ b/saleor/graphql/shop/types.py@@ -17,6 +17,7 @@ from ..core.enums import WeightUnitsEnumfrom ..core.types.common import (CountryDisplay, LanguageDisplay, PermissionDisplay)from ..menu.types import Menu+from ..payment.enums import PaymentGatewayEnumfrom ..product.types import Collectionfrom ..utils import format_permissions_for_displayfrom .enums import AuthorizationKeyType@@ -76,6 +77,8 @@ class Shop(graphene.ObjectType):required=True)default_currency = graphene.String(description='Default shop\'s currency.', required=True)+ enabled_gateways = graphene.List(+ PaymentGatewayEnum, description='List of available payment gateways.')default_country = graphene.Field(CountryDisplay, description='Default shop\'s country')description = graphene.String(description='Shop\'s description.')@@ -144,6 +147,9 @@ class Shop(graphene.ObjectType):def resolve_default_currency(self, info):return settings.DEFAULT_CURRENCY+ def resolve_enabled_gateways(self, info):+ return settings.CHECKOUT_PAYMENT_GATEWAYS.keys()+def resolve_description(self, info):return info.context.site.settings.description