@tinacms/graphql 0.0.0-202241914439 → 0.0.0-202241915394

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # tina-graphql
2
2
 
3
- ## 0.0.0-202241914439
3
+ ## 0.0.0-202241915394
4
4
 
5
5
  ### Patch Changes
6
6
 
package/dist/index.js CHANGED
@@ -22672,6 +22672,7 @@ var Resolver = class {
22672
22672
  assertShape(args, (yup3) => yup3.object({ relativePath: yup3.string().required() }));
22673
22673
  const collection = await this.tinaSchema.getCollection(collectionLookup);
22674
22674
  const realPath = import_path3.default.join(collection == null ? void 0 : collection.path, args.relativePath);
22675
+ console.log(collection == null ? void 0 : collection.path, args.relativePath, realPath);
22675
22676
  const alreadyExists = await this.database.documentExists(realPath);
22676
22677
  if (isMutation) {
22677
22678
  if (isCreation) {
@@ -23004,6 +23005,7 @@ var resolve = async ({
23004
23005
  const lookup = await database.getLookup(returnType);
23005
23006
  const isMutation = info.parentType.toString() === "Mutation";
23006
23007
  const value = source[info.fieldName];
23008
+ console.log(returnType);
23007
23009
  if (returnType === "Collection") {
23008
23010
  if (value) {
23009
23011
  return value;
@@ -23041,15 +23043,18 @@ var resolve = async ({
23041
23043
  return value;
23042
23044
  }
23043
23045
  const isCreation = lookup[info.fieldName] === "create";
23046
+ console.log("h", lookup.resolveType);
23044
23047
  switch (lookup.resolveType) {
23045
23048
  case "nodeDocument":
23046
23049
  assertShape(args, (yup3) => yup3.object({ id: yup3.string().required() }));
23047
23050
  return resolver2.getDocument(args.id);
23048
23051
  case "multiCollectionDocument":
23049
23052
  if (typeof value === "string") {
23053
+ console.log("a - calling getDocument");
23050
23054
  return resolver2.getDocument(value);
23051
23055
  }
23052
23056
  if (args && args.collection && info.fieldName === "addPendingDocument") {
23057
+ console.log("b - calling resolveDocument");
23053
23058
  return resolver2.resolveDocument({
23054
23059
  args: __spreadProps(__spreadValues({}, args), { params: {} }),
23055
23060
  collection: args.collection,
@@ -23064,6 +23069,7 @@ var resolve = async ({
23064
23069
  "updateDocument",
23065
23070
  "deleteDocument"
23066
23071
  ].includes(info.fieldName)) {
23072
+ console.log("c - calling resolveDocument", args);
23067
23073
  const result2 = await resolver2.resolveDocument({
23068
23074
  args,
23069
23075
  collection: args.collection,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/graphql",
3
- "version": "0.0.0-202241914439",
3
+ "version": "0.0.0-202241915394",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [