@graphql-codegen/typescript-react-offix 2.3.3-alpha-0814e49cc.0 → 2.3.3
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 +4 -4
- package/typings/index.d.cts +6 -0
- package/typings/visitor.d.cts +16 -0
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-react-offix",
|
|
3
|
-
"version": "2.3.3
|
|
3
|
+
"version": "2.3.3",
|
|
4
4
|
"description": "GraphQL Code Generator plugin for generating useOffline mutations for offix use",
|
|
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",
|
|
7
7
|
"graphql-tag": "^2.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@graphql-codegen/plugin-helpers": "^2.6.
|
|
11
|
-
"@graphql-codegen/visitor-plugin-common": "2.12.1
|
|
10
|
+
"@graphql-codegen/plugin-helpers": "^2.6.2",
|
|
11
|
+
"@graphql-codegen/visitor-plugin-common": "2.12.1",
|
|
12
12
|
"auto-bind": "~4.0.0",
|
|
13
13
|
"change-case-all": "1.0.14"
|
|
14
14
|
},
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"exports": {
|
|
29
29
|
".": {
|
|
30
30
|
"require": {
|
|
31
|
-
"types": "./typings/index.d.
|
|
31
|
+
"types": "./typings/index.d.cts",
|
|
32
32
|
"default": "./cjs/index.js"
|
|
33
33
|
},
|
|
34
34
|
"import": {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PluginValidateFn, PluginFunction } from '@graphql-codegen/plugin-helpers';
|
|
2
|
+
import { RawClientSideBasePluginConfig } from '@graphql-codegen/visitor-plugin-common';
|
|
3
|
+
import { ReactApolloVisitor } from './visitor.cjs';
|
|
4
|
+
export declare const plugin: PluginFunction<RawClientSideBasePluginConfig>;
|
|
5
|
+
export declare const validate: PluginValidateFn<any>;
|
|
6
|
+
export { ReactApolloVisitor };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ClientSideBaseVisitor, ClientSideBasePluginConfig, LoadedFragment, RawClientSideBasePluginConfig } from '@graphql-codegen/visitor-plugin-common';
|
|
2
|
+
import { OperationDefinitionNode, GraphQLSchema } from 'graphql';
|
|
3
|
+
import { Types } from '@graphql-codegen/plugin-helpers';
|
|
4
|
+
export interface ReactApolloPluginConfig extends ClientSideBasePluginConfig {
|
|
5
|
+
}
|
|
6
|
+
export declare class ReactApolloVisitor extends ClientSideBaseVisitor<RawClientSideBasePluginConfig, ReactApolloPluginConfig> {
|
|
7
|
+
private _externalImportPrefix;
|
|
8
|
+
private imports;
|
|
9
|
+
constructor(schema: GraphQLSchema, fragments: LoadedFragment[], rawConfig: RawClientSideBasePluginConfig, documents: Types.DocumentFile[]);
|
|
10
|
+
private getOffixReactHooksImport;
|
|
11
|
+
private getDocumentNodeVariable;
|
|
12
|
+
getImports(): string[];
|
|
13
|
+
private _buildHooks;
|
|
14
|
+
protected buildOperation(node: OperationDefinitionNode, documentVariableName: string, operationType: string, operationResultType: string, operationVariablesTypes: string): string;
|
|
15
|
+
OperationDefinition(node: OperationDefinitionNode): string;
|
|
16
|
+
}
|