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

test fix async #280

Merged
merged 3 commits into from
Apr 10, 2024
Merged

test fix async #280

merged 3 commits into from
Apr 10, 2024

Conversation

delcroip
Copy link
Member

@delcroip delcroip commented Apr 10, 2024

chatGTP doc:

Your tested version of coerce_mutation_data appears to be more comprehensive and handles various cases including nested input types. Here's a brief explanation of the key aspects:

Handling Nested Input Types: The method recursively handles nested input types by calling itself if the field type is a custom input object.

Checking Field Type: Instead of using field.type, it directly checks the class of the field (field.class). This allows more precise checking and handling of different types, such as graphene.List or custom input types.

Custom Input Types: For custom input types, it handles coercion by calling coerce_mutation_data recursively with the inner input class.

Logging: It includes logging for cases where a key is not found in the input class. This can be helpful for debugging.

Default Input Class: It allows specifying a default input class if input_class is not provided.

Overall, this version seems robust and capable of handling various scenarios encountered in mutation data coercion. Ensure to test it thoroughly with different input data and input class configurations to verify its correctness and effectiveness. If any specific business rules or requirements apply to your application, make sure they are properly accounted for in the coercion logic.

@delcroip delcroip marked this pull request as ready for review April 10, 2024 11:57
Copy link

sonarcloud bot commented Apr 10, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
7.4% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@delcroip delcroip merged commit 70e31eb into develop Apr 10, 2024
5 of 12 checks passed
@delcroip delcroip deleted the feature/fix-async branch April 10, 2024 12:52
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.

1 participant