Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add model_rebuild_calls for result_types.py #278

Merged
merged 9 commits into from
Feb 27, 2024
Merged

Conversation

Minister944
Copy link
Contributor

@Minister944 Minister944 commented Feb 23, 2024

The problem #276 , which emerged with the introduction of #241 , is resolved by this update.
It adds back generate_method_call for result_types.py.
Fixes #276

@Minister944 Minister944 self-assigned this Feb 23, 2024
Copy link
Contributor

@rafalp rafalp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whole problem that #241 sought to address was that calling model_rebuild for models that don't require it killed client performance.

I am seeing in tests changes that models that don't have forward references are now having model_rebuild calls which will bring us back to square one.

@rafalp rafalp merged commit fdc5fb8 into main Feb 27, 2024
4 checks passed
@rafalp rafalp deleted the model_rebuild_calls branch February 27, 2024 16:04
bombsimon added a commit to bombsimon/ariadne-codegen that referenced this pull request Mar 6, 2024
Followup from mirumee#278 and mirumee#276. We added back support to call
`model_rebuild` when needed for result types but didn't add it for input
types. Since input types can also require model rebuild when containing
nested fields we need to call `include_model_rebuild` for these types as
well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing model_rebuild() calls for models that require it.
2 participants