@graphql-codegen/core 2.6.1-alpha-d2a18d212.0 → 2.6.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.
- package/package.json +3 -3
- package/typings/codegen.d.cts +3 -0
- package/typings/execute-plugin.d.cts +18 -0
- package/typings/index.d.cts +2 -0
- package/typings/utils.d.cts +10 -0
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/core",
|
|
3
|
-
"version": "2.6.1
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@graphql-codegen/plugin-helpers": "^2.
|
|
8
|
+
"@graphql-codegen/plugin-helpers": "^2.6.2",
|
|
9
9
|
"@graphql-tools/schema": "^8.5.0",
|
|
10
10
|
"@graphql-tools/utils": "^8.8.0",
|
|
11
11
|
"tslib": "~2.4.0"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"exports": {
|
|
46
46
|
".": {
|
|
47
47
|
"require": {
|
|
48
|
-
"types": "./typings/index.d.
|
|
48
|
+
"types": "./typings/index.d.cts",
|
|
49
49
|
"default": "./cjs/index.js"
|
|
50
50
|
},
|
|
51
51
|
"import": {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Types, CodegenPlugin, Profiler } from '@graphql-codegen/plugin-helpers';
|
|
2
|
+
import { DocumentNode, GraphQLSchema } from 'graphql';
|
|
3
|
+
export interface ExecutePluginOptions {
|
|
4
|
+
name: string;
|
|
5
|
+
config: Types.PluginConfig;
|
|
6
|
+
parentConfig: Types.PluginConfig;
|
|
7
|
+
schema: DocumentNode;
|
|
8
|
+
schemaAst?: GraphQLSchema;
|
|
9
|
+
documents: Types.DocumentFile[];
|
|
10
|
+
outputFilename: string;
|
|
11
|
+
allPlugins: Types.ConfiguredPlugin[];
|
|
12
|
+
skipDocumentsValidation?: Types.SkipDocumentsValidationOptions;
|
|
13
|
+
pluginContext?: {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
};
|
|
16
|
+
profiler?: Profiler;
|
|
17
|
+
}
|
|
18
|
+
export declare function executePlugin(options: ExecutePluginOptions, plugin: CodegenPlugin): Promise<Types.PluginOutput>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Types } from '@graphql-codegen/plugin-helpers';
|
|
2
|
+
import { DocumentNode, GraphQLSchema } from 'graphql';
|
|
3
|
+
export declare function isObjectMap(obj: any): obj is Types.PluginConfig<any>;
|
|
4
|
+
export declare function prioritize<T>(...values: T[]): T;
|
|
5
|
+
export declare function pickFlag<TConfig, TKey extends keyof TConfig>(flag: TKey, config: TConfig): TConfig[TKey] | undefined;
|
|
6
|
+
export declare function shouldValidateDuplicateDocuments(skipDocumentsValidationOption: Types.GenerateOptions['skipDocumentsValidation']): boolean;
|
|
7
|
+
export declare function shouldValidateDocumentsAgainstSchema(skipDocumentsValidationOption: Types.GenerateOptions['skipDocumentsValidation']): boolean;
|
|
8
|
+
export declare function getSkipDocumentsValidationOption(options: Types.GenerateOptions): Types.SkipDocumentsValidationOptions;
|
|
9
|
+
export declare function hasFederationSpec(schemaOrAST: GraphQLSchema | DocumentNode): boolean;
|
|
10
|
+
export declare function extractHashFromSchema(schema: GraphQLSchema): string | null;
|