GraphQL interfaces cause incorrect inheritance

We use GraphQL to query mapped entities from 2 different products. Product A does not have entity inheritance, while Product B has inheritance.
Suppose we have the following mappings: entities A1 <->B1, and A2 <->B2. On product B, B2 is a subtype of B1. Their fields are merged in a single GraphQL interface. Thus, we have interface1 = A1 fields & B1 fields, interface2 = A2 fields & B2 fields, and interface2 inherits interface1. Based on this interface, a GraphQL schema is generated to allow queries from both products on the mapped entity.
However, undesired inheritance scenarios are introduced in product A. When a custom field is created on entity A1, it will also be available to query on entity A2, which is a wrong behavior, since product A does not support inheritance.
We are looking for a way to eliminate this situation, while also preserving the inheritance for product B.

Read more here: Source link