@graphql-codegen/import-types-preset 2.2.4 → 2.2.5-alpha-20221018123033-99bc320fe

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-codegen/import-types-preset",
3
- "version": "2.2.4",
3
+ "version": "2.2.5-alpha-20221018123033-99bc320fe",
4
4
  "description": "GraphQL Code Generator preset for importing types to operation file",
5
5
  "peerDependencies": {
6
6
  "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"
@@ -8,7 +8,7 @@
8
8
  "dependencies": {
9
9
  "@graphql-codegen/add": "^3.2.1",
10
10
  "@graphql-codegen/plugin-helpers": "^2.6.2",
11
- "@graphql-codegen/visitor-plugin-common": "2.12.2",
11
+ "@graphql-codegen/visitor-plugin-common": "2.13.0-alpha-20221018123033-99bc320fe",
12
12
  "tslib": "~2.4.0"
13
13
  },
14
14
  "repository": {
@@ -6,14 +6,22 @@ export declare type ImportTypesConfig = {
6
6
  * The key of the output is used a the base path for this file.
7
7
  *
8
8
  * @exampleMarkdown
9
- * ```yaml {5}
10
- * generates:
11
- * path/to/file.ts:
12
- * preset: import-types
13
- * presetConfig:
14
- * typesPath: types.ts
15
- * plugins:
16
- * - typescript-operations
9
+ * ```ts filename="codegen.ts" {10}
10
+ * import type { CodegenConfig } from '@graphql-codegen/cli';
11
+ *
12
+ * const config: CodegenConfig = {
13
+ * // ...
14
+ * generates: {
15
+ * 'path/to/file.ts': {
16
+ * preset: 'import-types',
17
+ * plugins: ['typescript-operations'],
18
+ * presetConfig: {
19
+ * typesPath: 'types.ts'
20
+ * },
21
+ * },
22
+ * },
23
+ * };
24
+ * export default config;
17
25
  * ```
18
26
  */
19
27
  typesPath: string;
@@ -22,15 +30,23 @@ export declare type ImportTypesConfig = {
22
30
  * @default Types
23
31
  *
24
32
  * @exampleMarkdown
25
- * ```yaml {6}
26
- * generates:
27
- * src/:
28
- * preset: import-types
29
- * presetConfig:
30
- * typesPath: types.ts
31
- * importTypesNamespace: SchemaTypes
32
- * plugins:
33
- * - typescript-operations
33
+ * ```ts filename="codegen.ts" {11}
34
+ * import type { CodegenConfig } from '@graphql-codegen/cli';
35
+ *
36
+ * const config: CodegenConfig = {
37
+ * // ...
38
+ * generates: {
39
+ * 'path/to/file.ts': {
40
+ * preset: 'import-types',
41
+ * plugins: ['typescript-operations'],
42
+ * presetConfig: {
43
+ * typesPath: 'types.ts',
44
+ * importTypesNamespace: 'SchemaTypes',
45
+ * },
46
+ * },
47
+ * },
48
+ * };
49
+ * export default config;
34
50
  * ```
35
51
  */
36
52
  importTypesNamespace?: string;
@@ -6,14 +6,22 @@ export declare type ImportTypesConfig = {
6
6
  * The key of the output is used a the base path for this file.
7
7
  *
8
8
  * @exampleMarkdown
9
- * ```yaml {5}
10
- * generates:
11
- * path/to/file.ts:
12
- * preset: import-types
13
- * presetConfig:
14
- * typesPath: types.ts
15
- * plugins:
16
- * - typescript-operations
9
+ * ```ts filename="codegen.ts" {10}
10
+ * import type { CodegenConfig } from '@graphql-codegen/cli';
11
+ *
12
+ * const config: CodegenConfig = {
13
+ * // ...
14
+ * generates: {
15
+ * 'path/to/file.ts': {
16
+ * preset: 'import-types',
17
+ * plugins: ['typescript-operations'],
18
+ * presetConfig: {
19
+ * typesPath: 'types.ts'
20
+ * },
21
+ * },
22
+ * },
23
+ * };
24
+ * export default config;
17
25
  * ```
18
26
  */
19
27
  typesPath: string;
@@ -22,15 +30,23 @@ export declare type ImportTypesConfig = {
22
30
  * @default Types
23
31
  *
24
32
  * @exampleMarkdown
25
- * ```yaml {6}
26
- * generates:
27
- * src/:
28
- * preset: import-types
29
- * presetConfig:
30
- * typesPath: types.ts
31
- * importTypesNamespace: SchemaTypes
32
- * plugins:
33
- * - typescript-operations
33
+ * ```ts filename="codegen.ts" {11}
34
+ * import type { CodegenConfig } from '@graphql-codegen/cli';
35
+ *
36
+ * const config: CodegenConfig = {
37
+ * // ...
38
+ * generates: {
39
+ * 'path/to/file.ts': {
40
+ * preset: 'import-types',
41
+ * plugins: ['typescript-operations'],
42
+ * presetConfig: {
43
+ * typesPath: 'types.ts',
44
+ * importTypesNamespace: 'SchemaTypes',
45
+ * },
46
+ * },
47
+ * },
48
+ * };
49
+ * export default config;
34
50
  * ```
35
51
  */
36
52
  importTypesNamespace?: string;