@bobbykim/manguito-cms-cli 0.6.2 → 0.8.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.
@@ -10,8 +10,9 @@ import {
10
10
  buildRelationsMap,
11
11
  init_esm_shims,
12
12
  isColumnBacked,
13
+ relationCardinality,
13
14
  resolveRelationField
14
- } from "./chunk-52I54C3X.js";
15
+ } from "./chunk-4LYEA2W3.js";
15
16
 
16
17
  // ../../node_modules/.pnpm/@whatwg-node+fetch@0.10.13/node_modules/@whatwg-node/fetch/dist/shouldSkipPonyfill.js
17
18
  var require_shouldSkipPonyfill = __commonJS({
@@ -10786,10 +10787,10 @@ var require_parser = __commonJS({
10786
10787
  }
10787
10788
  });
10788
10789
 
10789
- // ../api/dist/handler-GED3I7Z2.mjs
10790
+ // ../api/dist/handler-VEOWJRAL.mjs
10790
10791
  init_esm_shims();
10791
10792
 
10792
- // ../api/dist/chunk-4LLELFAZ.mjs
10793
+ // ../api/dist/chunk-Y5SWT7PO.mjs
10793
10794
  init_esm_shims();
10794
10795
 
10795
10796
  // ../../node_modules/.pnpm/graphql-yoga@5.21.2_graphql@16.14.2/node_modules/graphql-yoga/esm/index.js
@@ -30122,7 +30123,7 @@ function createYoga(options) {
30122
30123
  });
30123
30124
  }
30124
30125
 
30125
- // ../api/dist/chunk-4LLELFAZ.mjs
30126
+ // ../api/dist/chunk-Y5SWT7PO.mjs
30126
30127
  var import_dataloader = __toESM(require_dataloader(), 1);
30127
30128
 
30128
30129
  // ../../node_modules/.pnpm/@escape.tech+graphql-armor@3.2.0_@envelop+core@5.5.1_@escape.tech+graphql-armor-types@0.7.0/node_modules/@escape.tech/graphql-armor/dist/graphql-armor.esm.js
@@ -30880,7 +30881,7 @@ var EnvelopArmor = class {
30880
30881
  }
30881
30882
  };
30882
30883
 
30883
- // ../api/dist/chunk-4LLELFAZ.mjs
30884
+ // ../api/dist/chunk-Y5SWT7PO.mjs
30884
30885
  var DateTimeScalar = new GraphQLScalarType({
30885
30886
  name: "DateTime",
30886
30887
  description: "ISO-8601 date-time string",
@@ -31213,7 +31214,8 @@ function buildGraphQLSchema(registry, fieldKeyMaps = {}, view, programmaticKeyMa
31213
31214
  `
31214
31215
  );
31215
31216
  }
31216
- return new GraphQLList(new GraphQLNonNull(target ?? MEDIA));
31217
+ const t = target ?? MEDIA;
31218
+ return relationCardinality(field) === "one" ? t : new GraphQLList(new GraphQLNonNull(t));
31217
31219
  }
31218
31220
  if (field.field_type === "reference") {
31219
31221
  const ref = field.ui_component.component === "typeahead-select" ? field.ui_component.ref : void 0;
@@ -31222,8 +31224,7 @@ function buildGraphQLSchema(registry, fieldKeyMaps = {}, view, programmaticKeyMa
31222
31224
  process.stderr.write(`\u26A0 reference field '${field.name}' targets unknown type '${ref}'; exposing as Media
31223
31225
  `);
31224
31226
  }
31225
- const rel = field.ui_component.component === "typeahead-select" ? field.ui_component.rel : void 0;
31226
- const isMany = rel === "many-to-many" || rel === "one-to-many";
31227
+ const isMany = relationCardinality(field) === "many";
31227
31228
  const t = target ?? MEDIA;
31228
31229
  return isMany ? new GraphQLList(new GraphQLNonNull(t)) : t;
31229
31230
  }