Ariadne Codegen: code generator for Python GraphQL clients #1017
rafalp
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Ariadne Codegen is now available!
It's a code generator that generates Python GraphQL clients from schema and queries. This project evolved from the utility tool that was created at Mirumee to speed up the process of writing services integrating with and extending the GraphQL API of Saleor, Mirume's open source e-commerce package.
The way it works is you configure it adding dedicated
[ariadne-codegen]
section for it to yourpyproject.toml
file, which contains settings for codegen telling it where to find the GraphQL schema and operations. You then run theariadne-codegen
command which makes the Codegen parse those files and generate a Python package implementing the GraphQL client providing those operations as fully typed methods.Multiple customization options are also provided, including option switch between async and sync client, inject custom Python code into generated classes or swap default HTTP client with custom one.
GitHub repository can be found here: mirumee/ariadne-codegen
You can find more details and explanations in the release announcement on Ariadne blog
Beta Was this translation helpful? Give feedback.
All reactions