@graphql-codegen/typescript-rtk-query 2.3.5 → 2.3.6-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/typescript-rtk-query",
3
- "version": "2.3.5",
3
+ "version": "2.3.6-alpha-20221018123033-99bc320fe",
4
4
  "description": "GraphQL Code Generator plugin for injecting graphql endpoints into a preconfigured RTK Query api",
5
5
  "peerDependencies": {
6
6
  "@reduxjs/toolkit": "^1.6.0",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@graphql-codegen/plugin-helpers": "^2.7.0",
13
- "@graphql-codegen/visitor-plugin-common": "2.12.2",
13
+ "@graphql-codegen/visitor-plugin-common": "2.13.0-alpha-20221018123033-99bc320fe",
14
14
  "auto-bind": "~4.0.0",
15
15
  "change-case-all": "1.0.14",
16
16
  "tslib": "~2.4.0"
@@ -5,14 +5,21 @@ export interface RTKConfig {
5
5
  * @description Define where to import the base api to inject endpoints into
6
6
  *
7
7
  * @exampleMarkdown
8
- * ```yaml
9
- * generates:
10
- * ./src/app/api/generated.ts:
11
- * plugins:
12
- * - typescript
13
- * - typescript-operations
14
- * - typescript-rtk-query:
15
- * importBaseApiFrom: 'src/app/api/baseApi'
8
+ * ```ts filename="codegen.ts"
9
+ * import type { CodegenConfig } from '@graphql-codegen/cli';
10
+ *
11
+ * const config: CodegenConfig = {
12
+ * // ...
13
+ * generates: {
14
+ * 'path/to/file.ts': {
15
+ * plugins: ['typescript', 'typescript-resolvers', 'typescript-rtk-query'],
16
+ * config: {
17
+ * importBaseApiFrom: 'src/app/api/baseApi',
18
+ * },
19
+ * },
20
+ * },
21
+ * };
22
+ * export default config;
16
23
  * ```
17
24
  */
18
25
  importBaseApiFrom: string;
@@ -23,15 +30,22 @@ export interface RTKConfig {
23
30
  *
24
31
 
25
32
  * @exampleMarkdown
26
- * ```yaml
27
- * generates:
28
- * ./src/app/api/generated.ts:
29
- * plugins:
30
- * - typescript
31
- * - typescript-operations
32
- * - typescript-rtk-query:
33
- * importBaseApiFrom: 'src/app/api/baseApi'
34
- * exportHooks: true
33
+ * ```ts filename="codegen.ts"
34
+ * import type { CodegenConfig } from '@graphql-codegen/cli';
35
+ *
36
+ * const config: CodegenConfig = {
37
+ * // ...
38
+ * generates: {
39
+ * 'path/to/file.ts': {
40
+ * plugins: ['typescript', 'typescript-resolvers', 'typescript-rtk-query'],
41
+ * config: {
42
+ * importBaseApiFrom: 'src/app/api/baseApi',
43
+ * exportHooks: true
44
+ * },
45
+ * },
46
+ * },
47
+ * };
48
+ * export default config;
35
49
  * ```
36
50
  */
37
51
  exportHooks?: boolean;
@@ -43,17 +57,22 @@ export interface RTKConfig {
43
57
  *
44
58
 
45
59
  * @exampleMarkdown
46
- * ```yaml
47
- * generates:
48
- * ./src/app/api/generated.ts:
49
- * plugins:
50
- * - add:
51
- * content: 'module.hot?.accept();'
52
- * - typescript
53
- * - typescript-operations
54
- * - typescript-rtk-query:
55
- * importBaseApiFrom: 'src/app/api/baseApi'
56
- * overrideExisting: 'module.hot?.status() === "apply"'
60
+ * ```ts filename="codegen.ts"
61
+ * import type { CodegenConfig } from '@graphql-codegen/cli';
62
+ *
63
+ * const config: CodegenConfig = {
64
+ * // ...
65
+ * generates: {
66
+ * 'path/to/file.ts': {
67
+ * plugins: ['typescript', 'typescript-resolvers', 'typescript-rtk-query'],
68
+ * config: {
69
+ * importBaseApiFrom: 'src/app/api/baseApi',
70
+ * overrideExisting: 'module.hot?.status() === "apply"'
71
+ * },
72
+ * },
73
+ * },
74
+ * };
75
+ * export default config;
57
76
  * ```
58
77
  */
59
78
  overrideExisting?: string;
@@ -5,14 +5,21 @@ export interface RTKConfig {
5
5
  * @description Define where to import the base api to inject endpoints into
6
6
  *
7
7
  * @exampleMarkdown
8
- * ```yaml
9
- * generates:
10
- * ./src/app/api/generated.ts:
11
- * plugins:
12
- * - typescript
13
- * - typescript-operations
14
- * - typescript-rtk-query:
15
- * importBaseApiFrom: 'src/app/api/baseApi'
8
+ * ```ts filename="codegen.ts"
9
+ * import type { CodegenConfig } from '@graphql-codegen/cli';
10
+ *
11
+ * const config: CodegenConfig = {
12
+ * // ...
13
+ * generates: {
14
+ * 'path/to/file.ts': {
15
+ * plugins: ['typescript', 'typescript-resolvers', 'typescript-rtk-query'],
16
+ * config: {
17
+ * importBaseApiFrom: 'src/app/api/baseApi',
18
+ * },
19
+ * },
20
+ * },
21
+ * };
22
+ * export default config;
16
23
  * ```
17
24
  */
18
25
  importBaseApiFrom: string;
@@ -23,15 +30,22 @@ export interface RTKConfig {
23
30
  *
24
31
 
25
32
  * @exampleMarkdown
26
- * ```yaml
27
- * generates:
28
- * ./src/app/api/generated.ts:
29
- * plugins:
30
- * - typescript
31
- * - typescript-operations
32
- * - typescript-rtk-query:
33
- * importBaseApiFrom: 'src/app/api/baseApi'
34
- * exportHooks: true
33
+ * ```ts filename="codegen.ts"
34
+ * import type { CodegenConfig } from '@graphql-codegen/cli';
35
+ *
36
+ * const config: CodegenConfig = {
37
+ * // ...
38
+ * generates: {
39
+ * 'path/to/file.ts': {
40
+ * plugins: ['typescript', 'typescript-resolvers', 'typescript-rtk-query'],
41
+ * config: {
42
+ * importBaseApiFrom: 'src/app/api/baseApi',
43
+ * exportHooks: true
44
+ * },
45
+ * },
46
+ * },
47
+ * };
48
+ * export default config;
35
49
  * ```
36
50
  */
37
51
  exportHooks?: boolean;
@@ -43,17 +57,22 @@ export interface RTKConfig {
43
57
  *
44
58
 
45
59
  * @exampleMarkdown
46
- * ```yaml
47
- * generates:
48
- * ./src/app/api/generated.ts:
49
- * plugins:
50
- * - add:
51
- * content: 'module.hot?.accept();'
52
- * - typescript
53
- * - typescript-operations
54
- * - typescript-rtk-query:
55
- * importBaseApiFrom: 'src/app/api/baseApi'
56
- * overrideExisting: 'module.hot?.status() === "apply"'
60
+ * ```ts filename="codegen.ts"
61
+ * import type { CodegenConfig } from '@graphql-codegen/cli';
62
+ *
63
+ * const config: CodegenConfig = {
64
+ * // ...
65
+ * generates: {
66
+ * 'path/to/file.ts': {
67
+ * plugins: ['typescript', 'typescript-resolvers', 'typescript-rtk-query'],
68
+ * config: {
69
+ * importBaseApiFrom: 'src/app/api/baseApi',
70
+ * overrideExisting: 'module.hot?.status() === "apply"'
71
+ * },
72
+ * },
73
+ * },
74
+ * };
75
+ * export default config;
57
76
  * ```
58
77
  */
59
78
  overrideExisting?: string;