@vantreeseba/drizzle-graphql 12.0.1 → 13.0.0

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/dist/index.js CHANGED
@@ -4296,17 +4296,15 @@ const computeResolverFieldNames = (tableName, typeNameMapper, prefixes, suffixes
4296
4296
  const upsertPrefix = prefixes.upsert ?? "upsert";
4297
4297
  const upsertArrayFieldName = `${upsertPrefix}${pluralNoun}${suffixes.list}`;
4298
4298
  const upsertSingleFieldName = mapped ? `${upsertPrefix}${capitalize(mapped.singular)}` : `${upsertPrefix}${capitalize(tableName)}${suffixes.single}`;
4299
- const updateBase = `${prefixes.update}${singularNoun}`;
4300
- const deleteBase = `${prefixes.delete}${singularNoun}`;
4301
- const restoreBase = `${prefixes.restore ?? "restore"}${singularNoun}`;
4302
- const updateFieldName = `${updateBase}${suffixes.list}`;
4299
+ const restorePrefix = prefixes.restore ?? "restore";
4300
+ const updateFieldName = `${prefixes.update}${pluralNoun}${suffixes.list}`;
4303
4301
  const updateManyFieldName = `${prefixes.update}${pluralNoun}Many`;
4304
- const deleteFieldName = `${deleteBase}${suffixes.list}`;
4305
- const restoreFieldName = `${restoreBase}${suffixes.list}`;
4306
- const writeSingleSuffix = suffixes.single === suffixes.list ? "Single" : suffixes.single;
4307
- const updateSingleFieldName = `${updateBase}${writeSingleSuffix}`;
4308
- const deleteSingleFieldName = `${deleteBase}${writeSingleSuffix}`;
4309
- const restoreSingleFieldName = `${restoreBase}${writeSingleSuffix}`;
4302
+ const deleteFieldName = `${prefixes.delete}${pluralNoun}${suffixes.list}`;
4303
+ const restoreFieldName = `${restorePrefix}${pluralNoun}${suffixes.list}`;
4304
+ const singleWrite = (prefix) => mapped ? `${prefix}${singularNoun}` : `${prefix}${singularNoun}${suffixes.single}`;
4305
+ const updateSingleFieldName = singleWrite(prefixes.update);
4306
+ const deleteSingleFieldName = singleWrite(prefixes.delete);
4307
+ const restoreSingleFieldName = singleWrite(restorePrefix);
4310
4308
  return {
4311
4309
  typeName,
4312
4310
  listFieldName,