Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add get_graphql_schema management command
Rafał Pitoń4f315734caae
diff --git a/saleor/graphql/management/__init__.py b/saleor/graphql/management/__init__.pynew file mode 100644index 0000000000..e69de29bb2diff --git a/saleor/graphql/management/commands/__init__.py b/saleor/graphql/management/commands/__init__.pynew file mode 100644index 0000000000..e69de29bb2diff --git a/saleor/graphql/management/commands/get_graphql_schema.py b/saleor/graphql/management/commands/get_graphql_schema.pynew file mode 100644index 0000000000..c9a068a94c--- /dev/null+++ b/saleor/graphql/management/commands/get_graphql_schema.py@@ -0,0 +1,11 @@+from django.core.management.base import BaseCommand+from graphql.utils.schema_printer import print_schema++from ...api import schema+++class Command(BaseCommand):+ help = 'Writes SDL for GraphQL API schema to stdout'++ def handle(self, *args, **options):+ self.stdout.write(print_schema(schema))