@tinacms/graphql 0.62.0 → 0.62.1

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.
Files changed (2) hide show
  1. package/dist/index.js +14 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7740,7 +7740,7 @@ Visit https://tina.io/docs/errors/ui-not-supported/ for more information
7740
7740
  });
7741
7741
  };
7742
7742
  var _a, _b, _c, _d;
7743
- this.maxDepth = (_d = (_c = (_b = (_a = config == null ? void 0 : config.tinaSchema.schema) == null ? void 0 : _a.config) == null ? void 0 : _b.client) == null ? void 0 : _c.referenceDepth) != null ? _d : 5;
7743
+ this.maxDepth = (_d = (_c = (_b = (_a = config == null ? void 0 : config.tinaSchema.schema) == null ? void 0 : _a.config) == null ? void 0 : _b.client) == null ? void 0 : _c.referenceDepth) != null ? _d : 2;
7744
7744
  this.tinaSchema = config.tinaSchema;
7745
7745
  this.database = config.database;
7746
7746
  }
@@ -7898,7 +7898,7 @@ var validateField = async (field) => {
7898
7898
 
7899
7899
  // package.json
7900
7900
  var name = "@tinacms/graphql";
7901
- var version = "0.62.0";
7901
+ var version = "0.62.1";
7902
7902
  var main = "dist/index.js";
7903
7903
  var typings = "dist/index.d.ts";
7904
7904
  var files = [
@@ -8301,6 +8301,17 @@ var _buildFragments = async (builder, tinaSchema, rootPath) => {
8301
8301
  };
8302
8302
  const fragPath = import_path.default.join(rootPath, ".tina", "__generated__");
8303
8303
  await import_fs_extra.default.outputFile(import_path.default.join(fragPath, "frags.gql"), (0, import_graphql2.print)(fragDoc));
8304
+ if (await (await import_fs_extra.default.stat(import_path.default.join(fragPath, "frags.gql"))).size > 100 * 1024) {
8305
+ console.warn("Warning: frags.gql is very large (>100kb). Consider setting the reference depth to 1 or 0. See code snippet below.");
8306
+ console.log(`const schema = defineSchema({
8307
+ config: {
8308
+ client: {
8309
+ referenceDepth: 1,
8310
+ },
8311
+ }
8312
+ // ...
8313
+ })`);
8314
+ }
8304
8315
  };
8305
8316
  var _buildQueries = async (builder, tinaSchema, rootPath) => {
8306
8317
  const operationsDefinitions = [];
@@ -25248,7 +25259,7 @@ var Database = class {
25248
25259
  cursor: (0, import_datalayer2.btoa)(edge.cursor)
25249
25260
  };
25250
25261
  } catch (error) {
25251
- if (error instanceof Error) {
25262
+ if (error instanceof Error && !edge.path.includes(".tina/__generated__/_graphql.json")) {
25252
25263
  throw new TinaQueryError({
25253
25264
  originalError: error,
25254
25265
  file: edge.path,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/graphql",
3
- "version": "0.62.0",
3
+ "version": "0.62.1",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [