File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
modules/graphql_core/src/Plugin/Deriver/Fields Expand file tree Collapse file tree 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) {
9292 $ targetType = $ this ->entityTypeManager ->getDefinition ($ targetTypeId );
9393 $ fieldName = $ fieldDefinition ->getName ();
9494
95+ $ parents = [];
9596 if ($ fieldDefinition instanceof BaseFieldDefinition || !$ entityType ->hasKey ('bundle ' )) {
9697 $ parents = [StringHelper::camelCase ($ entityTypeId )];
9798 }
98- else {
99- $ parents = [];
99+ elseif (isset ($ fieldMap [$ entityTypeId ][$ fieldName ])) {
100100 foreach ($ fieldMap [$ entityTypeId ][$ fieldName ]['bundles ' ] as $ bundle ) {
101101 $ parents [] = StringHelper::camelCase ($ entityTypeId . '_ ' . $ bundle );
102102 }
103103 }
104+
104105 $ derivative = [
105106 'parents ' => $ parents ,
106107 'name ' => StringHelper::propCase ('query ' , $ fieldName ),
You can’t perform that action at this time.
0 commit comments