remult 0.25.5-exp.16 → 0.25.5-exp.18
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,5 +1,5 @@
|
|
|
1
1
|
import { getRelationFieldInfo } from './internals.js';
|
|
2
|
-
import { Remult, remult } from './index.js';
|
|
2
|
+
import { CompoundIdField, Remult, remult } from './index.js';
|
|
3
3
|
import { DataApi } from './src/data-api.js';
|
|
4
4
|
import { getRepositoryInternals } from './src/remult3/repository-internals.js';
|
|
5
5
|
const v2ConnectionAndPagination = false;
|
|
@@ -369,7 +369,9 @@ export function remultGraphql(options) {
|
|
|
369
369
|
});
|
|
370
370
|
currentType.mutation.delete.payload = upsertTypes(deletePayload);
|
|
371
371
|
const deletedResultKey = `id`;
|
|
372
|
-
const type =
|
|
372
|
+
const type = meta.idMetadata.field instanceof CompoundIdField
|
|
373
|
+
? 'String'
|
|
374
|
+
: getGraphqlBaseType(meta.idMetadata.field);
|
|
373
375
|
currentType.mutation.delete.payload.fields.push({
|
|
374
376
|
key: deletedResultKey,
|
|
375
377
|
value: `${type}`,
|
package/graphql.js
CHANGED
|
@@ -453,7 +453,9 @@ function remultGraphql(options) {
|
|
|
453
453
|
});
|
|
454
454
|
currentType.mutation.delete.payload = upsertTypes(deletePayload);
|
|
455
455
|
var deletedResultKey_1 = "id";
|
|
456
|
-
var type =
|
|
456
|
+
var type = meta.idMetadata.field instanceof index_js_1.CompoundIdField
|
|
457
|
+
? 'String'
|
|
458
|
+
: getGraphqlBaseType(meta.idMetadata.field);
|
|
457
459
|
currentType.mutation.delete.payload.fields.push({
|
|
458
460
|
key: deletedResultKey_1,
|
|
459
461
|
value: "".concat(type),
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ import { LookupColumn } from '../column.js';
|
|
|
3
3
|
import type { FieldMetadata, FieldOptions, ValueConverter, ValueListItem } from '../column-interfaces.js';
|
|
4
4
|
import { Remult } from '../context.js';
|
|
5
5
|
import type { EntityOptions } from '../entity.js';
|
|
6
|
+
import { Filter } from '../filter/filter-interfaces.js';
|
|
6
7
|
import type { ControllerRef, ControllerRefForControllerBase, EntityFilter, EntityMetadata, EntityOrderBy, EntityRef, EntityRefForEntityBase, FieldRef, FieldsMetadata, FieldsRef, FieldsRefForEntityBase, FindFirstOptions, FindFirstOptionsBase, FindOptions, IdMetadata, LiveQuery, LoadOptions, MembersOnly, QueryOptions, QueryResult, Repository, RepositoryRelations, Subscribable } from './remult3.js';
|
|
7
8
|
import type { RefSubscriber } from './remult3.js';
|
|
8
9
|
import type { entityEventListener } from '../__EntityValueProvider.js';
|
|
@@ -72,6 +73,7 @@ export declare class RepositoryImplementation<entityType> implements Repository<
|
|
|
72
73
|
create(item?: Partial<MembersOnly<entityType>>): entityType;
|
|
73
74
|
fixTypes(item: any): Promise<any>;
|
|
74
75
|
findId(id: any, options?: FindFirstOptionsBase<entityType>): Promise<entityType>;
|
|
76
|
+
translateWhereToFilter(where: EntityFilter<entityType>): Promise<Filter>;
|
|
75
77
|
}
|
|
76
78
|
export type EntityOptionsFactory = (remult: Remult) => EntityOptions;
|
|
77
79
|
export declare function createOldEntity<T>(entity: ClassType<T>, remult: Remult): EntityFullInfo<T>;
|
|
@@ -1138,7 +1138,6 @@ var RepositoryImplementation = /** @class */ (function () {
|
|
|
1138
1138
|
throw new Error('id can be either number or string, but got: ' + typeof id);
|
|
1139
1139
|
return this.findFirst({}, tslib_1.__assign(tslib_1.__assign({}, options), { where: this.metadata.idMetadata.getIdFilter(id) }), true);
|
|
1140
1140
|
};
|
|
1141
|
-
/* @internal*/
|
|
1142
1141
|
RepositoryImplementation.prototype.translateWhereToFilter = function (where) {
|
|
1143
1142
|
var _a, _b;
|
|
1144
1143
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|