File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
packages/graphql/lib/schema-builder/factories Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,22 @@ export class InterfaceDefinitionFactory {
113
113
114
114
return ( ) => {
115
115
let fields : GraphQLFieldConfigMap < any , any > = { } ;
116
- metadata . properties . forEach ( ( field ) => {
116
+
117
+ let properties = [ ] ;
118
+ if ( metadata . interfaces ) {
119
+ const implementedInterfaces =
120
+ TypeMetadataStorage . getInterfacesMetadata ( )
121
+ . filter ( ( it ) =>
122
+ getInterfacesArray ( metadata . interfaces ) . includes ( it . target ) ,
123
+ )
124
+ . map ( ( it ) => it . properties ) ;
125
+ implementedInterfaces . forEach ( ( fields ) =>
126
+ properties . push ( ...( fields || [ ] ) ) ,
127
+ ) ;
128
+ }
129
+ properties = properties . concat ( metadata . properties ) ;
130
+
131
+ properties . forEach ( ( field ) => {
117
132
const type = this . outputTypeFactory . create (
118
133
field . name ,
119
134
field . typeFn ( ) ,
You can’t perform that action at this time.
0 commit comments