def METHOD_NAME(self, field: GraphQLField, indent: str = "") -> str:
    code_lines = []
    if isinstance(field.type, GraphQLObjectType):
        code_lines.append(f"{indent}{field.name} {{")
        for subfield in field.type.fields:
            code_lines.append(  # noqa: PERF401
                self.METHOD_NAME(subfield, indent=indent + "  ")
            )
        code_lines.append(f"{indent}}}")
    else:
        code_lines.append(f"{indent}{field.name}")
    return "\n".join(code_lines)