@tinacms/graphql 0.0.0-20223121531 → 0.0.0-2022312182829

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,22 @@
1
1
  # tina-graphql
2
2
 
3
- ## 0.0.0-20223121531
3
+ ## 0.0.0-2022312182829
4
+
5
+ ### Patch Changes
6
+
7
+ - 4da32454b: Modify database to write config json files without whitespace to reduce file sizes
8
+ - 921709a7e: Adds validation to the schema instead of only using typescript types
9
+ - 06666d39f: Link to MDX documentation when unregistered component error occurs
10
+ - Updated dependencies [a2906d6fe]
11
+ - @tinacms/datalayer@0.0.0-2022312182829
12
+
13
+ ## 0.59.10
14
+
15
+ ### Patch Changes
16
+
17
+ - cf33bcec1: Fix issue where store.clear() was not being awaited causing an invalid state after reindex
18
+
19
+ ## 0.59.9
4
20
 
5
21
  ### Patch Changes
6
22
 
@@ -38,9 +54,10 @@
38
54
  Before this fix, `breadcrumbs` was only the `basename` of the file minus the `extension`. So `my-folder-a/my-folder-b/my-file.md` would have `breadcrumbs` of `['my-file']`. With this change, `breadcrumbs` will be `['my-folder-a','my-folder-b','my-file']` (leaving out the `content/<collection>`).
39
55
 
40
56
  - e8b0de1f7: Add `parentTypename` to fields to allow us to disambiguate between fields which have the same field names but different types. Example, an event from field name of `blocks.0.title` could belong to a `Cta` block or a `Hero` block, both of which have a `title` field.
57
+ - Updated dependencies [8b3be903f]
41
58
  - Updated dependencies [a87e1e6fa]
42
59
  - Updated dependencies [b01f2e382]
43
- - @tinacms/datalayer@0.0.0-20223121531
60
+ - @tinacms/datalayer@0.1.0
44
61
 
45
62
  ## 0.59.8
46
63
 
@@ -147,10 +147,6 @@ export declare const NAMER: {
147
147
  dataMutationTypeName: (namespace: string[]) => string;
148
148
  updateName: (namespace: string[]) => string;
149
149
  createName: (namespace: string[]) => string;
150
- documentQueryName: () => string;
151
- documentConnectionQueryName: () => string;
152
- collectionQueryName: () => string;
153
- collectionListQueryName: () => string;
154
150
  queryName: (namespace: string[]) => string;
155
151
  generateQueryListName: (namespace: string[]) => string;
156
152
  fragmentName: (namespace: string[]) => string;
@@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
11
11
  limitations under the License.
12
12
  */
13
13
  import { Database } from '../database';
14
- import type { ObjectTypeDefinitionNode, InlineFragmentNode, FieldDefinitionNode, InterfaceTypeDefinitionNode } from 'graphql';
14
+ import type { ObjectTypeDefinitionNode, InlineFragmentNode } from 'graphql';
15
15
  import type { TinaCloudCollectionEnriched, Template } from '../types';
16
16
  import { TinaSchema } from '../schema';
17
17
  export declare const createBuilder: ({ database, tinaSchema, }: {
@@ -47,7 +47,7 @@ export declare class Builder {
47
47
  *
48
48
  * @param collections
49
49
  */
50
- buildCollectionDefinition: (collections: TinaCloudCollectionEnriched[]) => Promise<FieldDefinitionNode>;
50
+ buildCollectionDefinition: (collections: TinaCloudCollectionEnriched[]) => Promise<import("graphql").FieldDefinitionNode>;
51
51
  /**
52
52
  * ```graphql
53
53
  * # ex.
@@ -61,7 +61,7 @@ export declare class Builder {
61
61
  *
62
62
  * @param collections
63
63
  */
64
- buildMultiCollectionDefinition: (collections: TinaCloudCollectionEnriched[]) => Promise<FieldDefinitionNode>;
64
+ buildMultiCollectionDefinition: (collections: TinaCloudCollectionEnriched[]) => Promise<import("graphql").FieldDefinitionNode>;
65
65
  /**
66
66
  * ```graphql
67
67
  * # ex.
@@ -73,7 +73,7 @@ export declare class Builder {
73
73
  * }
74
74
  * ```
75
75
  */
76
- multiNodeDocument: () => Promise<FieldDefinitionNode>;
76
+ multiNodeDocument: () => Promise<import("graphql").FieldDefinitionNode>;
77
77
  /**
78
78
  * ```graphql
79
79
  * # ex.
@@ -87,7 +87,15 @@ export declare class Builder {
87
87
  *
88
88
  * @param collections
89
89
  */
90
- multiCollectionDocument: (collections: TinaCloudCollectionEnriched[]) => Promise<FieldDefinitionNode>;
90
+ multiCollectionDocument: (collections: TinaCloudCollectionEnriched[]) => Promise<import("graphql").FieldDefinitionNode>;
91
+ /**
92
+ * ```graphql
93
+ * {
94
+ * getDocumentFields()
95
+ * }
96
+ * ```
97
+ */
98
+ multiCollectionDocumentFields: () => Promise<import("graphql").FieldDefinitionNode>;
91
99
  /**
92
100
  * ```graphql
93
101
  * # ex.
@@ -101,7 +109,7 @@ export declare class Builder {
101
109
  *
102
110
  * @param collections
103
111
  */
104
- addMultiCollectionDocumentMutation: () => Promise<FieldDefinitionNode>;
112
+ addMultiCollectionDocumentMutation: () => Promise<import("graphql").FieldDefinitionNode>;
105
113
  /**
106
114
  * ```graphql
107
115
  * # ex.
@@ -115,7 +123,7 @@ export declare class Builder {
115
123
  *
116
124
  * @param collections
117
125
  */
118
- buildCreateCollectionDocumentMutation: (collections: TinaCloudCollectionEnriched[]) => Promise<FieldDefinitionNode>;
126
+ buildCreateCollectionDocumentMutation: (collections: TinaCloudCollectionEnriched[]) => Promise<import("graphql").FieldDefinitionNode>;
119
127
  /**
120
128
  * ```graphql
121
129
  * # ex.
@@ -129,7 +137,21 @@ export declare class Builder {
129
137
  *
130
138
  * @param collections
131
139
  */
132
- buildUpdateCollectionDocumentMutation: (collections: TinaCloudCollectionEnriched[]) => Promise<FieldDefinitionNode>;
140
+ buildUpdateCollectionDocumentMutation: (collections: TinaCloudCollectionEnriched[]) => Promise<import("graphql").FieldDefinitionNode>;
141
+ /**
142
+ * ```graphql
143
+ * # ex.
144
+ * {
145
+ * deleteDocument(relativePath: $relativePath, params: $params) {
146
+ * id
147
+ * data {...}
148
+ * }
149
+ * }
150
+ * ```
151
+ *
152
+ * @param collections
153
+ */
154
+ buildDeleteCollectionDocumentMutation: (collections: TinaCloudCollectionEnriched[]) => Promise<import("graphql").FieldDefinitionNode>;
133
155
  /**
134
156
  * ```graphql
135
157
  * # ex.
@@ -146,7 +168,7 @@ export declare class Builder {
146
168
  *
147
169
  * @param collections
148
170
  */
149
- multiCollectionDocumentList: (collections: TinaCloudCollectionEnriched[]) => Promise<FieldDefinitionNode>;
171
+ multiCollectionDocumentList: (collections: TinaCloudCollectionEnriched[]) => Promise<import("graphql").FieldDefinitionNode>;
150
172
  /**
151
173
  * ```graphql
152
174
  * # ex.
@@ -160,7 +182,7 @@ export declare class Builder {
160
182
  *
161
183
  * @param collection
162
184
  */
163
- collectionDocument: (collection: TinaCloudCollectionEnriched) => Promise<FieldDefinitionNode>;
185
+ collectionDocument: (collection: TinaCloudCollectionEnriched) => Promise<import("graphql").FieldDefinitionNode>;
164
186
  /**
165
187
  * Turns a collection into a fragment that gets updated on build. This fragment does not resolve references
166
188
  * ```graphql
@@ -191,7 +213,7 @@ export declare class Builder {
191
213
  *
192
214
  * @param collection
193
215
  */
194
- updateCollectionDocumentMutation: (collection: TinaCloudCollectionEnriched) => Promise<FieldDefinitionNode>;
216
+ updateCollectionDocumentMutation: (collection: TinaCloudCollectionEnriched) => Promise<import("graphql").FieldDefinitionNode>;
195
217
  /**
196
218
  * ```graphql
197
219
  * # ex.
@@ -205,7 +227,7 @@ export declare class Builder {
205
227
  *
206
228
  * @param collection
207
229
  */
208
- createCollectionDocumentMutation: (collection: TinaCloudCollectionEnriched) => Promise<FieldDefinitionNode>;
230
+ createCollectionDocumentMutation: (collection: TinaCloudCollectionEnriched) => Promise<import("graphql").FieldDefinitionNode>;
209
231
  /**
210
232
  * ```graphql
211
233
  * # ex.
@@ -222,12 +244,12 @@ export declare class Builder {
222
244
  *
223
245
  * @param collection
224
246
  */
225
- collectionDocumentList: (collection: TinaCloudCollectionEnriched) => Promise<FieldDefinitionNode>;
247
+ collectionDocumentList: (collection: TinaCloudCollectionEnriched) => Promise<import("graphql").FieldDefinitionNode>;
226
248
  /**
227
249
  * GraphQL type definitions which remain unchanged regardless
228
250
  * of the supplied Tina schema. Ex. "node" interface
229
251
  */
230
- buildStaticDefinitions: () => (import("graphql").ScalarTypeDefinitionNode | ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode[])[];
252
+ buildStaticDefinitions: () => (import("graphql").ScalarTypeDefinitionNode | ObjectTypeDefinitionNode | import("graphql").InterfaceTypeDefinitionNode[])[];
231
253
  private _buildCollectionDocumentType;
232
254
  private _filterCollectionDocumentType;
233
255
  private _buildTemplateFilter;
@@ -15,6 +15,7 @@ export interface Bridge {
15
15
  glob(pattern: string): Promise<string[]>;
16
16
  get(filepath: string): Promise<string>;
17
17
  put(filepath: string, data: string): Promise<void>;
18
+ delete(filepath: string): Promise<void>;
18
19
  /**
19
20
  * Whether this bridge supports the ability to build the schema.
20
21
  */
@@ -85,6 +85,7 @@ export declare class Database {
85
85
  tinaSchema: TinaSchema;
86
86
  }) => Promise<void>;
87
87
  indexContentByPaths: (documentPaths: string[]) => Promise<void>;
88
+ delete: (filepath: string) => Promise<void>;
88
89
  _indexAllContent: () => Promise<void>;
89
90
  addToLookupMap: (lookup: LookupMapType) => Promise<void>;
90
91
  }
@@ -122,7 +123,6 @@ export declare type CollectionDocumentListLookup = {
122
123
  declare type UnionDataLookup = {
123
124
  type: string;
124
125
  resolveType: 'unionData';
125
- collection?: string;
126
126
  typeMap: {
127
127
  [templateName: string]: string;
128
128
  };