File tree Expand file tree Collapse file tree 1 file changed +4
-16
lines changed
app/code/Magento/EavGraphQl/Model/Resolver Expand file tree Collapse file tree 1 file changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,11 @@ public function resolve(
55
55
) {
56
56
$ attributes ['items ' ] = null ;
57
57
$ attributeInputs = $ args ['attributes ' ];
58
- $ this ->validateInputFields ($ attributeInputs );
59
58
foreach ($ attributeInputs as $ attributeInput ) {
59
+ if (!isset ($ attributeInput ['attribute_code ' ]) || !isset ($ attributeInput ['entity_type ' ])) {
60
+ $ attributes ['items ' ][] = $ this ->createInputException ($ attributeInput );
61
+ continue ;
62
+ }
60
63
try {
61
64
$ attribute = $ this ->attribute ->getAttribute (
62
65
$ attributeInput ['attribute_code ' ],
@@ -129,21 +132,6 @@ private function getLayeredNavigationPropertiesEnum() {
129
132
];
130
133
}
131
134
132
- /**
133
- * Validate input
134
- *
135
- * @param array $attributeInputs
136
- */
137
- private function validateInputFields (array $ attributeInputs )
138
- {
139
- foreach ($ attributeInputs as $ attribute ) {
140
- if (!isset ($ attribute ['attribute_code ' ]) || !isset ($ attribute ['entity_type ' ])) {
141
- $ attributes ['items ' ][] = $ this ->createInputException ($ attribute );
142
- continue ;
143
- }
144
- }
145
- }
146
-
147
135
/**
148
136
* Create GraphQL input exception for an invalid attribute input
149
137
*
You can’t perform that action at this time.
0 commit comments