You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 6, 2025. It is now read-only.
Permit field renaming for interface implementations
This depends on some other code being merged into main, such as the code
for interface implementation suppression in PR #1002, so this is just a
rough draft at the moment and just contains the rough outline for what
this code would look like.
f"Field renaming for interface types is not supported yet, but they exist for the "
466
+
f"following types and should be removed: "
467
+
f"{visitor.interfaces_with_field_renamings}"
468
+
)
469
+
470
+
# Check that, for all field renaming for types that implement interfaces, the field renamings don't affect any fields included in the interfaces implemented by those types.
471
+
# TODO: A variant of this mapping also exists in the code for interface implementation suppression-- will need to adjust this code once that PR gets merged.
# A more convenient way to find out whether any interface contains this particular field or not. The existing InterfaceTypeDefinitionNode contains a list of FieldDefinitionNodes which we'd have to perform a linear search through every single time we want to check for field membership
# If any fields belonging to a type named "Foo" that were renamed also appear in an interface, interface_fields_renamed will map the "Foo" to a dict which maps the interface name to the field name.
f"Fields can be renamed in object types only if those fields do not appear in any interfaces that the object type implements. However, field_renamings contained renamings that violate this rule. The following maps object type names to a dictionary, which maps the interface name containing the field name to the field name, if the field appears in both the object type and the interface: {interface_fields_renamed}. To fix this, remove these renamings from field_renamings."
0 commit comments