@@ -71,6 +71,11 @@ class InputParamsResolver
7171 */
7272 private $ methodsMap ;
7373
74+ /**
75+ * @var array
76+ */
77+ private array $ inputData = [];
78+
7479 /**
7580 * Initialize dependencies.
7681 *
@@ -157,8 +162,14 @@ public function resolve()
157162 */
158163 public function getInputData ()
159164 {
165+ if (!empty ($ this ->inputData )) {
166+ return $ this ->inputData ;
167+ }
168+
160169 if ($ this ->isBulk === false ) {
161- return [$ this ->inputParamsResolver ->getInputData ()];
170+ $ this ->inputData = [$ this ->inputParamsResolver ->getInputData ()];
171+
172+ return $ this ->inputData ;
162173 }
163174 $ inputData = $ this ->request ->getRequestData ();
164175
@@ -168,7 +179,7 @@ public function getInputData()
168179 $ inputData = array_merge ($ requestBodyParams , $ inputData );
169180 }
170181
171- return array_map (function ($ singleEntityParams ) {
182+ $ this -> inputData = array_map (function ($ singleEntityParams ) {
172183 if (is_array ($ singleEntityParams )) {
173184 $ singleEntityParams = $ this ->filterInputData ($ singleEntityParams );
174185 $ singleEntityParams = $ this ->paramsOverrider ->override (
@@ -179,6 +190,8 @@ public function getInputData()
179190
180191 return $ singleEntityParams ;
181192 }, $ inputData );
193+
194+ return $ this ->inputData ;
182195 }
183196
184197 /**
0 commit comments