@@ -10232,16 +10232,17 @@ var Action = /** @class */ (function () {
1023210232 * @param {Data | undefined } variables Variables to send with the mutation
1023310233 * @param {Function } dispatch Vuex Dispatch method for the model
1023410234 * @param {Model } model The model this mutation affects.
10235+ * @param {boolean } multiple Tells if we're requesting a single record or multiple.
1023510236 * @returns {Promise<any> }
1023610237 */
10237- Action . mutation = function ( name , variables , dispatch , model ) {
10238+ Action . mutation = function ( name , variables , dispatch , model , multiple ) {
10239+ if ( multiple === void 0 ) { multiple = false ; }
1023810240 return __awaiter$2 ( this , void 0 , void 0 , function ( ) {
10239- var multiple , query , newData , insertedData ;
10241+ var query , newData , insertedData ;
1024010242 return __generator$2 ( this , function ( _a ) {
1024110243 switch ( _a . label ) {
1024210244 case 0 :
1024310245 if ( ! variables ) return [ 3 /*break*/ , 4 ] ;
10244- multiple = false ;
1024510246 query = QueryBuilder . buildQuery ( 'mutation' , model , name , variables , multiple ) ;
1024610247 return [ 4 /*yield*/ , Context . getInstance ( ) . apollo . request ( model , query , variables , true ) ] ;
1024710248 case 1 :
@@ -10559,7 +10560,7 @@ var Mutate = /** @class */ (function (_super) {
1055910560 // transformOutgoingData()
1056010561 this . transformArgs ( args ) ;
1056110562 // Send the mutation
10562- return [ 2 /*return*/ , Action . mutation ( mutationName , args , dispatch , model ) ] ;
10563+ return [ 2 /*return*/ , Action . mutation ( mutationName , args , dispatch , model , ! args [ 'id' ] ) ] ;
1056310564 } ) ;
1056410565 } ) ;
1056510566 } ;
@@ -10742,6 +10743,7 @@ var Push = /** @class */ (function (_super) {
1074210743 * @param {any } state The Vuex state
1074310744 * @param {DispatchFunction } dispatch Vuex Dispatch method for the model
1074410745 * @param {Arguments } data New data to save
10746+ * @param {Arguments } args Additional arguments
1074510747 * @returns {Promise<Data> } The updated record
1074610748 */
1074710749 Push . call = function ( _a , _b ) {
0 commit comments