@tinacms/graphql 0.61.8 → 0.63.0
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/dist/build.d.ts +15 -1
- package/dist/builder/index.d.ts +17 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2842 -24020
- package/dist/mdx/index.d.ts +1 -2
- package/dist/resolver/index.d.ts +15 -3
- package/package.json +8 -27
package/dist/build.d.ts
CHANGED
|
@@ -10,11 +10,25 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
10
10
|
See the License for the specific language governing permissions and
|
|
11
11
|
limitations under the License.
|
|
12
12
|
*/
|
|
13
|
+
import { DocumentNode } from 'graphql';
|
|
13
14
|
import type { TinaSchema } from './schema';
|
|
14
15
|
import { Database } from './database';
|
|
15
|
-
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* This will build the files (_schema.json, _lookup.json, _graphQL.json)
|
|
19
|
+
*/
|
|
20
|
+
export declare const indexDB: (args: {
|
|
16
21
|
database: Database;
|
|
17
22
|
config: TinaSchema['config'];
|
|
18
23
|
flags?: string[];
|
|
19
24
|
buildSDK?: boolean;
|
|
20
25
|
}) => Promise<void>;
|
|
26
|
+
export declare const buildFiles: ({ database, config, flags, buildSDK, }: {
|
|
27
|
+
database: Database;
|
|
28
|
+
config: TinaSchema['config'];
|
|
29
|
+
flags?: string[];
|
|
30
|
+
buildSDK?: boolean;
|
|
31
|
+
}) => Promise<{
|
|
32
|
+
graphQLSchema: DocumentNode;
|
|
33
|
+
tinaSchema: TinaSchema;
|
|
34
|
+
}>;
|
package/dist/builder/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export declare class Builder {
|
|
|
28
28
|
database: Database;
|
|
29
29
|
tinaSchema: TinaSchema;
|
|
30
30
|
};
|
|
31
|
+
private maxDepth;
|
|
31
32
|
tinaSchema: TinaSchema;
|
|
32
33
|
database: Database;
|
|
33
34
|
constructor(config: {
|
|
@@ -173,8 +174,23 @@ export declare class Builder {
|
|
|
173
174
|
* @param collection a Tina Cloud collection
|
|
174
175
|
*/
|
|
175
176
|
collectionFragment: (collection: TinaCloudCollectionEnriched) => Promise<import("graphql").FragmentDefinitionNode>;
|
|
177
|
+
/**
|
|
178
|
+
* Given a collection this function returns its selections set. For example for Post this would return
|
|
179
|
+
*
|
|
180
|
+
* "
|
|
181
|
+
* body
|
|
182
|
+
* title
|
|
183
|
+
* ... on Author {
|
|
184
|
+
* name
|
|
185
|
+
* heroImg
|
|
186
|
+
* }
|
|
187
|
+
*
|
|
188
|
+
* But in the AST format
|
|
189
|
+
*
|
|
190
|
+
* */
|
|
191
|
+
private _getCollectionFragmentSelections;
|
|
176
192
|
private _buildFieldNodeForFragments;
|
|
177
|
-
buildTemplateFragments(template: Template<true
|
|
193
|
+
buildTemplateFragments(template: Template<true>, depth: number): Promise<InlineFragmentNode>;
|
|
178
194
|
/**
|
|
179
195
|
* ```graphql
|
|
180
196
|
* # ex.
|
package/dist/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export type { Bridge } from './database/bridge';
|
|
|
22
22
|
export { sequential, assertShape } from './util';
|
|
23
23
|
export { stringifyFile, parseFile } from './database/util';
|
|
24
24
|
export declare type DummyType = unknown;
|
|
25
|
-
export declare const buildSchema: (rootPath: string, database: Database, flags?: string[]) => Promise<import("graphql").GraphQLSchema>;
|
|
25
|
+
export declare const buildSchema: (rootPath: string, database: Database, flags?: string[], skipIndexing?: boolean) => Promise<import("graphql").GraphQLSchema>;
|
|
26
26
|
import type { TinaCloudSchema as TinaCloudSchemaBase, TinaCloudCollection as TinaCloudCollectionBase, TinaCloudTemplateBase as TinaTemplate, TinaFieldBase } from './types';
|
|
27
27
|
export declare type TinaCloudSchema = TinaCloudSchemaBase<false>;
|
|
28
28
|
export declare type TinaSchema = TinaCloudSchema;
|