Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description
Note:
This pull request will be merged into another branch and deployed as a dev version (experimental). I want to test in some real projects. The code needs a refactor and some optimization.
This pull request introduces custom operation generation in
ariadne-codegen
. The following features have been implemented and tested:Response Types Generation
I attempted to generate response types using Pydantic classes. However, Pydantic version 2 is significantly slower. In the context of Saleor, which involves linking 81 classes, importing a single class from such a file takes approximately 7 seconds. Due to this performance issue, I am considering switching to regular
dataclass
es with custom functions for data type validation. This approach aims to improve performance while maintaining flexibility and robustness in type validation.Feel free to review the changes and provide feedback!
Simple example:
query_str: