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
fix: Field Middlewares do not work on interfaces of interfaces
The problem - If you have a class Foo, which implements a GQL interface IBar, and IBar implements GQL interface IBaz, field middlewares defined on IBar would work, but on IBaz they would get ignored.
object-type-definition.factory.ts#generateFields will create a custom field resolver if a middleware definition exists on that field.
Before the fix, the method would get a class; if it implements a (GQL) interface it will only get its interface and merge the interface fields with the class' fields, ignoring any interfaces implemented by the class' first interface.
The fix creates a new private method which will recursively get the interfaces of a class, and the interfaces of the returned interfaces, and merge all the fields into an array.
0 commit comments