@graphql-codegen/typescript-graphql-apollo 1.2.1-alpha-0814e49cc.0 → 1.2.1

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,14 +1,14 @@
1
1
  {
2
2
  "name": "@graphql-codegen/typescript-graphql-apollo",
3
- "version": "1.2.1-alpha-0814e49cc.0",
3
+ "version": "1.2.1",
4
4
  "description": "GraphQL Code Generator plugin for generating a ready-to-use SDK based on apollo client and GraphQL operations",
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.1-alpha-0814e49cc.0",
11
- "@graphql-codegen/visitor-plugin-common": "^2.12.1-alpha-0814e49cc.0",
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
  "tslib": "~2.4.0"
@@ -29,7 +29,7 @@
29
29
  "exports": {
30
30
  ".": {
31
31
  "require": {
32
- "types": "./typings/index.d.ts",
32
+ "types": "./typings/index.d.cts",
33
33
  "default": "./cjs/index.js"
34
34
  },
35
35
  "import": {
@@ -0,0 +1,6 @@
1
+ import { RawClientSideBasePluginConfig } from '@graphql-codegen/visitor-plugin-common';
2
+ /**
3
+ * @description This plugin generates [`graphql-request`](https://npmjs.com/package/graphql-request) ready-to-use SDK, which is fully-typed.
4
+ */
5
+ export interface RawGraphQLApolloPluginConfig extends RawClientSideBasePluginConfig {
6
+ }
@@ -0,0 +1,6 @@
1
+ import { PluginValidateFn, PluginFunction } from '@graphql-codegen/plugin-helpers';
2
+ import { GraphQLApolloVisitor } from './visitor.cjs';
3
+ import { RawGraphQLApolloPluginConfig } from './config.cjs';
4
+ export declare const plugin: PluginFunction<RawGraphQLApolloPluginConfig>;
5
+ export declare const validate: PluginValidateFn<any>;
6
+ export { GraphQLApolloVisitor };
@@ -0,0 +1,16 @@
1
+ import { ClientSideBasePluginConfig, ClientSideBaseVisitor, LoadedFragment } from '@graphql-codegen/visitor-plugin-common';
2
+ import { GraphQLSchema, OperationDefinitionNode } from 'graphql';
3
+ import { RawGraphQLApolloPluginConfig } from './config.cjs';
4
+ export interface GraphQLRequestPluginConfig extends ClientSideBasePluginConfig {
5
+ rawRequest: boolean;
6
+ }
7
+ export declare class GraphQLApolloVisitor extends ClientSideBaseVisitor<RawGraphQLApolloPluginConfig, GraphQLRequestPluginConfig> {
8
+ private _operationsToInclude;
9
+ constructor(schema: GraphQLSchema, fragments: LoadedFragment[], rawConfig: RawGraphQLApolloPluginConfig);
10
+ OperationDefinition(node: OperationDefinitionNode): string;
11
+ protected buildOperation(node: OperationDefinitionNode, documentVariableName: string, operationType: string, operationResultType: string, operationVariablesTypes: string): string;
12
+ get sdkContent(): string;
13
+ private static getDocumentFieldName;
14
+ private static getApolloOperation;
15
+ private static getApolloOperationOptionType;
16
+ }