scripts.shopify.generate_client

Regenerates api/integrations/shopify/generated/ (make shopify-client).

Downloads the Admin GraphQL schema of SHOPIFY_API_VERSION from the store in .env, then runs ariadne-codegen on it with the queries of api/integrations/shopify/queries/: a typed client, one method and one Pydantic model per query. Rerun after changing a query or the API version; mypy then reports the code a change breaks.

Attributes

Functions

download_schema() → None

main() → int

Module Contents

scripts.shopify.generate_client.ROOT
scripts.shopify.generate_client.SCHEMA
scripts.shopify.generate_client.download_schema() → None
scripts.shopify.generate_client.main() → int