@pgpmjs/migrate-client 0.15.11 → 0.15.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.
@@ -74,7 +74,7 @@ export class MigrateFileModel {
74
74
  });
75
75
  }
76
76
  update(args) {
77
- const { document, variables } = buildUpdateByPkDocument('MigrateFile', 'updateMigrateFile', 'migrateFile', args.select, args.where.id, args.data, 'UpdateMigrateFileInput', 'id', 'migrateFilePatch', connectionFieldsMap);
77
+ const { document, variables } = buildUpdateByPkDocument('MigrateFile', 'updateMigrateFile', 'migrateFile', args.select, args.where.id, args.data, 'UpdateMigrateFileInput', 'id', 'migrateFilePatch', connectionFieldsMap, undefined);
78
78
  return new QueryBuilder({
79
79
  client: this.client,
80
80
  operation: 'mutation',
@@ -74,7 +74,7 @@ export class SqlActionModel {
74
74
  });
75
75
  }
76
76
  update(args) {
77
- const { document, variables } = buildUpdateByPkDocument('SqlAction', 'updateSqlAction', 'sqlAction', args.select, args.where.id, args.data, 'UpdateSqlActionInput', 'id', 'sqlActionPatch', connectionFieldsMap);
77
+ const { document, variables } = buildUpdateByPkDocument('SqlAction', 'updateSqlAction', 'sqlAction', args.select, args.where.id, args.data, 'UpdateSqlActionInput', 'id', 'sqlActionPatch', connectionFieldsMap, undefined);
78
78
  return new QueryBuilder({
79
79
  client: this.client,
80
80
  operation: 'mutation',
@@ -63,7 +63,7 @@ export declare function buildUpdateDocument<TSelect, TWhere extends {
63
63
  document: string;
64
64
  variables: Record<string, unknown>;
65
65
  };
66
- export declare function buildUpdateByPkDocument<TSelect, TData>(operationName: string, mutationField: string, entityField: string, select: TSelect, id: string | number, data: TData, inputTypeName: string, idFieldName: string, patchFieldName: string, connectionFieldsMap?: Record<string, Record<string, string>>): {
66
+ export declare function buildUpdateByPkDocument<TSelect, TData>(operationName: string, mutationField: string, entityField: string, select: TSelect, id: string | number, data: TData, inputTypeName: string, idFieldName: string, patchFieldName: string, connectionFieldsMap?: Record<string, Record<string, string>>, extraKeys?: Record<string, unknown>): {
67
67
  document: string;
68
68
  variables: Record<string, unknown>;
69
69
  };
@@ -292,7 +292,7 @@ export function buildUpdateDocument(operationName, mutationField, entityField, s
292
292
  },
293
293
  };
294
294
  }
295
- export function buildUpdateByPkDocument(operationName, mutationField, entityField, select, id, data, inputTypeName, idFieldName, patchFieldName, connectionFieldsMap) {
295
+ export function buildUpdateByPkDocument(operationName, mutationField, entityField, select, id, data, inputTypeName, idFieldName, patchFieldName, connectionFieldsMap, extraKeys) {
296
296
  const selections = select
297
297
  ? buildSelections(select, connectionFieldsMap, operationName)
298
298
  : [t.field({ name: 'id' })];
@@ -311,6 +311,7 @@ export function buildUpdateByPkDocument(operationName, mutationField, entityFiel
311
311
  variables: {
312
312
  input: {
313
313
  [idFieldName]: id,
314
+ ...extraKeys,
314
315
  [patchFieldName]: data,
315
316
  },
316
317
  },
@@ -77,7 +77,7 @@ class MigrateFileModel {
77
77
  });
78
78
  }
79
79
  update(args) {
80
- const { document, variables } = (0, query_builder_1.buildUpdateByPkDocument)('MigrateFile', 'updateMigrateFile', 'migrateFile', args.select, args.where.id, args.data, 'UpdateMigrateFileInput', 'id', 'migrateFilePatch', input_types_1.connectionFieldsMap);
80
+ const { document, variables } = (0, query_builder_1.buildUpdateByPkDocument)('MigrateFile', 'updateMigrateFile', 'migrateFile', args.select, args.where.id, args.data, 'UpdateMigrateFileInput', 'id', 'migrateFilePatch', input_types_1.connectionFieldsMap, undefined);
81
81
  return new query_builder_1.QueryBuilder({
82
82
  client: this.client,
83
83
  operation: 'mutation',
@@ -77,7 +77,7 @@ class SqlActionModel {
77
77
  });
78
78
  }
79
79
  update(args) {
80
- const { document, variables } = (0, query_builder_1.buildUpdateByPkDocument)('SqlAction', 'updateSqlAction', 'sqlAction', args.select, args.where.id, args.data, 'UpdateSqlActionInput', 'id', 'sqlActionPatch', input_types_1.connectionFieldsMap);
80
+ const { document, variables } = (0, query_builder_1.buildUpdateByPkDocument)('SqlAction', 'updateSqlAction', 'sqlAction', args.select, args.where.id, args.data, 'UpdateSqlActionInput', 'id', 'sqlActionPatch', input_types_1.connectionFieldsMap, undefined);
81
81
  return new query_builder_1.QueryBuilder({
82
82
  client: this.client,
83
83
  operation: 'mutation',
@@ -63,7 +63,7 @@ export declare function buildUpdateDocument<TSelect, TWhere extends {
63
63
  document: string;
64
64
  variables: Record<string, unknown>;
65
65
  };
66
- export declare function buildUpdateByPkDocument<TSelect, TData>(operationName: string, mutationField: string, entityField: string, select: TSelect, id: string | number, data: TData, inputTypeName: string, idFieldName: string, patchFieldName: string, connectionFieldsMap?: Record<string, Record<string, string>>): {
66
+ export declare function buildUpdateByPkDocument<TSelect, TData>(operationName: string, mutationField: string, entityField: string, select: TSelect, id: string | number, data: TData, inputTypeName: string, idFieldName: string, patchFieldName: string, connectionFieldsMap?: Record<string, Record<string, string>>, extraKeys?: Record<string, unknown>): {
67
67
  document: string;
68
68
  variables: Record<string, unknown>;
69
69
  };
@@ -344,7 +344,7 @@ function buildUpdateDocument(operationName, mutationField, entityField, select,
344
344
  },
345
345
  };
346
346
  }
347
- function buildUpdateByPkDocument(operationName, mutationField, entityField, select, id, data, inputTypeName, idFieldName, patchFieldName, connectionFieldsMap) {
347
+ function buildUpdateByPkDocument(operationName, mutationField, entityField, select, id, data, inputTypeName, idFieldName, patchFieldName, connectionFieldsMap, extraKeys) {
348
348
  const selections = select
349
349
  ? buildSelections(select, connectionFieldsMap, operationName)
350
350
  : [t.field({ name: 'id' })];
@@ -363,6 +363,7 @@ function buildUpdateByPkDocument(operationName, mutationField, entityField, sele
363
363
  variables: {
364
364
  input: {
365
365
  [idFieldName]: id,
366
+ ...extraKeys,
366
367
  [patchFieldName]: data,
367
368
  },
368
369
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pgpmjs/migrate-client",
3
- "version": "0.15.11",
3
+ "version": "0.15.12",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "Typed GraphQL ORM client for the Constructive Migrate API (db_migrate schema)",
6
6
  "main": "index.js",
@@ -50,5 +50,5 @@
50
50
  "makage": "^0.3.0",
51
51
  "typescript": "^5.9.3"
52
52
  },
53
- "gitHead": "00ebac5e8314330aa47564ed71758a4bcc8f8f8e"
53
+ "gitHead": "18401477360e5f3e350ecbbe1f35e92c56e83353"
54
54
  }