Update GraphQL fixing logic
rafalp opened this issue · comments
Rafał Pitoń commented
Ariadne should export two utility functions:
validate_schema_enum_values(schema: GraphQLSchema)
to raise validation errors on invalid enum members.repair_default_enum_values(schema: GraphQLSchema)
to walk the schema and fixdefault_value
on all places where enum arg or input field has default value set, becausegraphql-core
sets it to string.
We could also drop set_default_enum_values_on_schema
from Ariadne because graphql-core
now defaults to setting enums default values after their members names.
I've already implemented universal tests suite for catching issues in our GraphQL enum handling, I will use it while working on this issue.