File tree 1 file changed +3
-2
lines changed
modules/graphql_core/src/Plugin/Deriver/Fields
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -92,15 +92,16 @@ public function getDerivativeDefinitions($basePluginDefinition) {
92
92
$ targetType = $ this ->entityTypeManager ->getDefinition ($ targetTypeId );
93
93
$ fieldName = $ fieldDefinition ->getName ();
94
94
95
+ $ parents = [];
95
96
if ($ fieldDefinition instanceof BaseFieldDefinition || !$ entityType ->hasKey ('bundle ' )) {
96
97
$ parents = [StringHelper::camelCase ($ entityTypeId )];
97
98
}
98
- else {
99
- $ parents = [];
99
+ elseif (isset ($ fieldMap [$ entityTypeId ][$ fieldName ])) {
100
100
foreach ($ fieldMap [$ entityTypeId ][$ fieldName ]['bundles ' ] as $ bundle ) {
101
101
$ parents [] = StringHelper::camelCase ($ entityTypeId . '_ ' . $ bundle );
102
102
}
103
103
}
104
+
104
105
$ derivative = [
105
106
'parents ' => $ parents ,
106
107
'name ' => StringHelper::propCase ('query ' , $ fieldName ),
You can’t perform that action at this time.
0 commit comments