@tinacms/graphql 1.0.0 → 1.0.2

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.
@@ -190,7 +190,7 @@ export declare class Builder {
190
190
  * */
191
191
  private _getCollectionFragmentSelections;
192
192
  private _buildFieldNodeForFragments;
193
- buildTemplateFragments(template: Template<true>, depth: number): Promise<InlineFragmentNode>;
193
+ buildTemplateFragments(template: Template<true>, depth: number): Promise<InlineFragmentNode | boolean>;
194
194
  /**
195
195
  * ```graphql
196
196
  * # ex.
package/dist/index.js CHANGED
@@ -2300,8 +2300,11 @@ Visit https://tina.io/docs/errors/ui-not-supported/ for more information
2300
2300
  const field = await this._buildFieldNodeForFragments(item, depth);
2301
2301
  selections.push(field);
2302
2302
  });
2303
+ const filteredSelections = filterSelections(selections);
2304
+ if (!filteredSelections.length)
2305
+ return false;
2303
2306
  return astBuilder.InlineFragmentDefinition({
2304
- selections: filterSelections(selections),
2307
+ selections: filteredSelections,
2305
2308
  name: NAMER.dataTypeName(template.namespace)
2306
2309
  });
2307
2310
  }
@@ -2451,7 +2454,7 @@ var validateField = async (field) => {
2451
2454
 
2452
2455
  // package.json
2453
2456
  var name = "@tinacms/graphql";
2454
- var version = "1.0.0";
2457
+ var version = "1.0.2";
2455
2458
  var main = "dist/index.js";
2456
2459
  var typings = "dist/index.d.ts";
2457
2460
  var files = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/graphql",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [
@@ -20,8 +20,8 @@
20
20
  "dependencies": {
21
21
  "@graphql-tools/relay-operation-optimizer": "^6.4.1",
22
22
  "@tinacms/datalayer": "1.0.0",
23
- "@tinacms/schema-tools": "1.0.0",
24
- "@tinacms/mdx": "1.0.0",
23
+ "@tinacms/schema-tools": "1.0.2",
24
+ "@tinacms/mdx": "1.0.2",
25
25
  "body-parser": "^1.19.0",
26
26
  "cors": "^2.8.5",
27
27
  "dataloader": "^2.0.0",
@@ -72,7 +72,7 @@
72
72
  },
73
73
  "devDependencies": {
74
74
  "@tinacms/datalayer": "1.0.0",
75
- "@tinacms/schema-tools": "1.0.0",
75
+ "@tinacms/schema-tools": "1.0.2",
76
76
  "@tinacms/scripts": "1.0.0",
77
77
  "@types/cors": "^2.8.7",
78
78
  "@types/estree": "^0.0.50",