TLDR: edge A should not be a child of the first expand in your query.
In your example set, has(field2) results in a type B which expand returns field2 for… But expand has no edges in type B so the rest of your query is not doing anything.
You have a forward edge from (:B)-[:A]->(:A) so I think you want this:
{
a(func: has(field2)){ #equivilent to type(B) here
expand(_all_) #gives you field2
A{
expand(_all_) #gives you field1
}
}
}
If edge predicate A was in the type definition for type B it would expand it for you as well.