You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @description This plugin generates `React-Query` Hooks with TypeScript typings.
9
-
*
10
-
* It extends the basic TypeScript plugins: `@graphql-codegen/typescript`, `@graphql-codegen/typescript-operations` - and thus shares a similar configuration.
11
-
*
12
-
* > **If you are using the `react-query` package instead of the `@tanstack/react-query` package in your project, please set the `legacyMode` option to `true`.**
13
-
*
14
-
*/
15
-
exportinterfaceReactQueryRawPluginConfig
16
-
extendsOmit<
17
-
RawClientSideBasePluginConfig,
18
-
|'documentMode'
19
-
|'noGraphQLTag'
20
-
|'gqlImport'
21
-
|'documentNodeImport'
22
-
|'noExport'
23
-
|'importOperationTypesFrom'
24
-
|'importDocumentNodeExternallyFrom'
25
-
|'useTypeImports'
26
-
|'legacyMode'
27
-
>{
7
+
exportinterfaceBaseReactQueryPluginConfig{
28
8
/**
29
-
* @description Customize the fetcher you wish to use in the generated file. React-Query is agnostic to the data-fetching layer, so you should provide it, or use a custom one.
30
-
*
31
-
* The following options are available to use:
32
-
*
33
-
* - 'fetch' - requires you to specify endpoint and headers on each call, and uses `fetch` to do the actual http call.
34
-
* - `{ endpoint: string, fetchParams: RequestInit }`: hardcode your endpoint and fetch options into the generated output, using the environment `fetch` method. You can also use `process.env.MY_VAR` as endpoint or header value.
35
-
* - `file#identifier` - You can use custom fetcher method that should implement the exported `ReactQueryFetcher` interface. Example: `./my-fetcher#myCustomFetcher`.
36
-
* - `graphql-request`: Will generate each hook with `client` argument, where you should pass your own `GraphQLClient` (created from `graphql-request`).
9
+
* @default unknown
10
+
* @description Changes the default "TError" generic type.
* @description This plugin generates `React-Query` Hooks with TypeScript typings.
113
+
*
114
+
* It extends the basic TypeScript plugins: `@graphql-codegen/typescript`, `@graphql-codegen/typescript-operations` - and thus shares a similar configuration.
115
+
*
116
+
* > **If you are using the `react-query` package instead of the `@tanstack/react-query` package in your project, please set the `legacyMode` option to `true`.**
117
+
*
118
+
*/
119
+
exportinterfaceReactQueryRawPluginConfig
120
+
extendsOmit<
121
+
RawClientSideBasePluginConfig,
122
+
|'documentMode'
123
+
|'noGraphQLTag'
124
+
|'gqlImport'
125
+
|'documentNodeImport'
126
+
|'noExport'
127
+
|'importOperationTypesFrom'
128
+
|'importDocumentNodeExternallyFrom'
129
+
|'useTypeImports'
130
+
|'legacyMode'
131
+
>,
132
+
BaseReactQueryPluginConfig{
133
+
/**
134
+
* @description Customize the fetcher you wish to use in the generated file. React-Query is agnostic to the data-fetching layer, so you should provide it, or use a custom one.
135
+
*
136
+
* The following options are available to use:
137
+
*
138
+
* - 'fetch' - requires you to specify endpoint and headers on each call, and uses `fetch` to do the actual http call.
139
+
* - `{ endpoint: string, fetchParams: RequestInit }`: hardcode your endpoint and fetch options into the generated output, using the environment `fetch` method. You can also use `process.env.MY_VAR` as endpoint or header value.
140
+
* - `file#identifier` - You can use custom fetcher method that should implement the exported `ReactQueryFetcher` interface. Example: `./my-fetcher#myCustomFetcher`.
141
+
* - `graphql-request`: Will generate each hook with `client` argument, where you should pass your own `GraphQLClient` (created from `graphql-request`).
0 commit comments