@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 +2 -2
- package/typings/config.d.cts +47 -28
- package/typings/config.d.ts +47 -28
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-rtk-query",
|
|
3
|
-
"version": "2.3.
|
|
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.
|
|
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"
|
package/typings/config.d.cts
CHANGED
|
@@ -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
|
-
* ```
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
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
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
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
|
-
* ```
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
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;
|
package/typings/config.d.ts
CHANGED
|
@@ -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
|
-
* ```
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
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
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
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
|
-
* ```
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
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;
|