remult 0.23.0-exp.11 → 0.23.0-exp.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/graphql.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { getRelationInfo } from './internals';
1
2
  import { Remult, remult } from './index';
2
3
  import { DataApi } from './src/data-api';
3
4
  const v2ConnectionAndPagination = false;
@@ -447,6 +448,11 @@ Select a dedicated page.`,
447
448
  }
448
449
  const whereTypeFields = [];
449
450
  for (const f of meta.fields) {
451
+ const ri = getRelationInfo(f.options);
452
+ // let's not consider toMany relations for now
453
+ if (ri?.type === 'toMany') {
454
+ break;
455
+ }
450
456
  if (f.options.includeInApi === false)
451
457
  continue;
452
458
  let type = 'String';
@@ -1,5 +1,5 @@
1
1
  export { getRelationInfo } from './src/remult3/relationInfoMember';
2
- export { decorateColumnSettings } from './src/remult3/RepositoryImplementation';
2
+ export { decorateColumnSettings, controllerRefImpl, getControllerRef, } from './src/remult3/RepositoryImplementation';
3
3
  export { getEntitySettings } from './src/remult3/getEntityRef';
4
4
  export { __updateEntityBasedOnWhere } from './src/filter/filter-interfaces';
5
5
  export { actionInfo } from './src/server-action-info';
package/esm/internals.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { getRelationInfo } from './src/remult3/relationInfoMember';
2
- export { decorateColumnSettings } from './src/remult3/RepositoryImplementation';
2
+ export { decorateColumnSettings, controllerRefImpl, getControllerRef, } from './src/remult3/RepositoryImplementation';
3
3
  export { getEntitySettings } from './src/remult3/getEntityRef';
4
4
  export { __updateEntityBasedOnWhere } from './src/filter/filter-interfaces';
5
5
  export { actionInfo } from './src/server-action-info';
@@ -602,3 +602,5 @@ export function __updateEntityBasedOnWhere(entityDefs, where, r) {
602
602
  });
603
603
  }
604
604
  }
605
+ // toRaw of default remult threw and exception
606
+ // toRaw didn't respect
package/graphql.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.translateWhereToRestBody = exports.remultGraphql = void 0;
4
4
  var tslib_1 = require("tslib");
5
+ var internals_1 = require("./internals");
5
6
  var index_1 = require("./index");
6
7
  var data_api_1 = require("./src/data-api");
7
8
  var v2ConnectionAndPagination = false;
@@ -522,6 +523,11 @@ function remultGraphql(options) {
522
523
  }
523
524
  var whereTypeFields = [];
524
525
  var _loop_2 = function (f) {
526
+ var ri = (0, internals_1.getRelationInfo)(f.options);
527
+ // let's not consider toMany relations for now
528
+ if ((ri === null || ri === void 0 ? void 0 : ri.type) === 'toMany') {
529
+ return "break";
530
+ }
525
531
  if (f.options.includeInApi === false)
526
532
  return "continue";
527
533
  var type = 'String';
@@ -634,7 +640,9 @@ function remultGraphql(options) {
634
640
  try {
635
641
  for (var _s = (e_6 = void 0, tslib_1.__values(meta.fields)), _t = _s.next(); !_t.done; _t = _s.next()) {
636
642
  var f = _t.value;
637
- _loop_2(f);
643
+ var state_1 = _loop_2(f);
644
+ if (state_1 === "break")
645
+ break;
638
646
  }
639
647
  }
640
648
  catch (e_6_1) { e_6 = { error: e_6_1 }; }
package/internals.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { getRelationInfo } from './src/remult3/relationInfoMember';
2
- export { decorateColumnSettings } from './src/remult3/RepositoryImplementation';
2
+ export { decorateColumnSettings, controllerRefImpl, getControllerRef, } from './src/remult3/RepositoryImplementation';
3
3
  export { getEntitySettings } from './src/remult3/getEntityRef';
4
4
  export { __updateEntityBasedOnWhere } from './src/filter/filter-interfaces';
5
5
  export { actionInfo } from './src/server-action-info';
package/internals.js CHANGED
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.actionInfo = exports.__updateEntityBasedOnWhere = exports.getEntitySettings = exports.decorateColumnSettings = exports.getRelationInfo = void 0;
3
+ exports.actionInfo = exports.__updateEntityBasedOnWhere = exports.getEntitySettings = exports.getControllerRef = exports.controllerRefImpl = exports.decorateColumnSettings = exports.getRelationInfo = void 0;
4
4
  var relationInfoMember_1 = require("./src/remult3/relationInfoMember");
5
5
  Object.defineProperty(exports, "getRelationInfo", { enumerable: true, get: function () { return relationInfoMember_1.getRelationInfo; } });
6
6
  var RepositoryImplementation_1 = require("./src/remult3/RepositoryImplementation");
7
7
  Object.defineProperty(exports, "decorateColumnSettings", { enumerable: true, get: function () { return RepositoryImplementation_1.decorateColumnSettings; } });
8
+ Object.defineProperty(exports, "controllerRefImpl", { enumerable: true, get: function () { return RepositoryImplementation_1.controllerRefImpl; } });
9
+ Object.defineProperty(exports, "getControllerRef", { enumerable: true, get: function () { return RepositoryImplementation_1.getControllerRef; } });
8
10
  var getEntityRef_1 = require("./src/remult3/getEntityRef");
9
11
  Object.defineProperty(exports, "getEntitySettings", { enumerable: true, get: function () { return getEntityRef_1.getEntitySettings; } });
10
12
  var filter_interfaces_1 = require("./src/filter/filter-interfaces");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remult",
3
- "version": "0.23.0-exp.11",
3
+ "version": "0.23.0-exp.12",
4
4
  "description": "A CRUD framework for full-stack TypeScript",
5
5
  "types": "index.d.ts",
6
6
  "module": "esm/index.js",
@@ -782,3 +782,5 @@ function __updateEntityBasedOnWhere(entityDefs, where, r) {
782
782
  }
783
783
  }
784
784
  exports.__updateEntityBasedOnWhere = __updateEntityBasedOnWhere;
785
+ // toRaw of default remult threw and exception
786
+ // toRaw didn't respect