@tinacms/graphql 0.59.4 → 0.59.7

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.
@@ -27,7 +27,7 @@ export declare class Resolver {
27
27
  database: Database;
28
28
  tinaSchema: TinaSchema;
29
29
  constructor(init: ResolverConfig);
30
- resolveCollection: (collectionName: string) => Promise<{
30
+ resolveCollection: (collectionName: string, hasDocuments?: boolean) => Promise<{
31
31
  fields: string | import("../types").TinaFieldInner<true>[];
32
32
  templates?: undefined;
33
33
  references?: import("../types").ReferenceTypeWithNamespace[];
@@ -37,7 +37,7 @@ export declare class Resolver {
37
37
  path: string;
38
38
  format?: "json" | "md" | "markdown" | "mdx";
39
39
  match?: string;
40
- documents: string[];
40
+ documents: {};
41
41
  } | {
42
42
  templates: (string | {
43
43
  label: string;
@@ -54,7 +54,7 @@ export declare class Resolver {
54
54
  path: string;
55
55
  format?: "json" | "md" | "markdown" | "mdx";
56
56
  match?: string;
57
- documents: string[];
57
+ documents: {};
58
58
  }>;
59
59
  getDocument: (fullPath: unknown) => Promise<{
60
60
  __typename: string;
@@ -53,10 +53,10 @@ export declare class TinaSchema {
53
53
  namespace: string[];
54
54
  };
55
55
  getCollectionByFullPath: (filepath: string) => Promise<TinaCloudCollection<true>>;
56
- getCollectionAndTemplateByFullPath: (filepath: string, templateName?: string) => Promise<{
56
+ getCollectionAndTemplateByFullPath: (filepath: string, templateName?: string) => {
57
57
  collection: TinaCloudCollection<true>;
58
58
  template: Templateable;
59
- }>;
59
+ };
60
60
  getTemplateForData: ({ data, collection, }: {
61
61
  data?: unknown;
62
62
  collection: Collectable;
package/dist/types.d.ts CHANGED
@@ -144,6 +144,7 @@ export declare type ObjectType<WithNamespace extends boolean> = ObjectTemplates<
144
144
  declare type ObjectTemplates<WithNamespace extends boolean> = WithNamespace extends true ? ObjectTemplatesWithNamespace<WithNamespace> : ObjectTemplatesInner<WithNamespace>;
145
145
  interface ObjectTemplatesInner<WithNamespace extends boolean> extends TinaField {
146
146
  type: 'object';
147
+ required?: false;
147
148
  /**
148
149
  * templates can either be an array of Tina templates or a reference to
149
150
  * global template definition.
@@ -157,6 +158,7 @@ interface ObjectTemplatesInner<WithNamespace extends boolean> extends TinaField
157
158
  }
158
159
  interface ObjectTemplatesWithNamespace<WithNamespace extends boolean> extends TinaField {
159
160
  type: 'object';
161
+ required?: false;
160
162
  /**
161
163
  * templates can either be an array of Tina templates or a reference to
162
164
  * global template definition.
@@ -172,6 +174,7 @@ interface ObjectTemplatesWithNamespace<WithNamespace extends boolean> extends Ti
172
174
  declare type ObjectFields<WithNamespace extends boolean> = WithNamespace extends true ? InnerObjectFieldsWithNamespace<WithNamespace> : InnerObjectFields<WithNamespace>;
173
175
  interface InnerObjectFields<WithNamespace extends boolean> extends TinaField {
174
176
  type: 'object';
177
+ required?: false;
175
178
  /**
176
179
  * fields can either be an array of Tina fields, or a reference to the fields
177
180
  * of a global template definition.
@@ -183,6 +186,7 @@ interface InnerObjectFields<WithNamespace extends boolean> extends TinaField {
183
186
  }
184
187
  interface InnerObjectFieldsWithNamespace<WithNamespace extends boolean> extends TinaField {
185
188
  type: 'object';
189
+ required?: false;
186
190
  /**
187
191
  * fields can either be an array of Tina fields, or a reference to the fields
188
192
  * of a global template definition.
@@ -235,6 +239,7 @@ export declare type CollectionTemplateableUnion = {
235
239
  export declare type CollectionTemplateableObject = {
236
240
  namespace: string[];
237
241
  type: 'object';
242
+ required?: false;
238
243
  template: Templateable;
239
244
  };
240
245
  export declare type CollectionTemplateable = CollectionTemplateableUnion | CollectionTemplateableObject;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/graphql",
3
- "version": "0.59.4",
3
+ "version": "0.59.7",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [
@@ -94,8 +94,8 @@
94
94
  "directory": "packages/tina-graphql"
95
95
  },
96
96
  "devDependencies": {
97
- "@tinacms/datalayer": "0.0.1",
98
- "@tinacms/scripts": "0.50.4",
97
+ "@tinacms/datalayer": "0.0.2",
98
+ "@tinacms/scripts": "0.50.6",
99
99
  "@types/cors": "^2.8.7",
100
100
  "@types/estree": "^0.0.50",
101
101
  "@types/express": "^4.17.8",