@graphql-codegen/plugin-helpers 2.6.2 → 2.7.0-alpha-20220830073722-8ec5b5eab

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/plugin-helpers",
3
- "version": "2.6.2",
3
+ "version": "2.7.0-alpha-20220830073722-8ec5b5eab",
4
4
  "description": "GraphQL Code Generator common utils and types",
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,3 +7,4 @@ export * from './errors.cjs';
7
7
  export * from './getCachedDocumentNodeFromSchema.cjs';
8
8
  export * from './oldVisit.cjs';
9
9
  export * from './profiler.cjs';
10
+ export { Types } from './types.cjs';
@@ -7,3 +7,4 @@ export * from './errors.js';
7
7
  export * from './getCachedDocumentNodeFromSchema.js';
8
8
  export * from './oldVisit.js';
9
9
  export * from './profiler.js';
10
+ export { Types } from './types.js';
@@ -195,6 +195,8 @@ export declare namespace Types {
195
195
  type NamedPlugin = string;
196
196
  type NamedPreset = string;
197
197
  type OutputConfig = NamedPlugin | ConfiguredPlugin;
198
+ type PresetNamesBase = 'client' | 'near-operation-file' | 'gql-tag-operations' | 'graphql-modules' | 'import-types-preset';
199
+ type PresetNames = `${PresetNamesBase}-preset` | PresetNamesBase;
198
200
  /**
199
201
  * @additionalProperties false
200
202
  */
@@ -219,7 +221,7 @@ export declare namespace Types {
219
221
  *
220
222
  * List of available presets: https://graphql-code-generator.com/docs/presets/presets-index
221
223
  */
222
- preset?: string | OutputPreset;
224
+ preset?: PresetNames | OutputPreset;
223
225
  /**
224
226
  * @description If your setup uses Preset to have a more dynamic setup and output, set the configuration object of your preset here.
225
227
  *
@@ -303,6 +305,7 @@ export declare namespace Types {
303
305
  };
304
306
  type OutputPreset<TPresetConfig = any> = {
305
307
  buildGeneratesSection: (options: PresetFnArgs<TPresetConfig>) => Promisable<GenerateOptions[]>;
308
+ prepareDocuments?: (outputFilePath: string, outputSpecificDocuments: Types.OperationDocument[]) => Promisable<Types.OperationDocument[]>;
306
309
  };
307
310
  type RequireExtension = InstanceOrArray<string>;
308
311
  type PackageLoaderFn<TExpectedResult> = (name: string) => Promisable<TExpectedResult>;
@@ -195,6 +195,8 @@ export declare namespace Types {
195
195
  type NamedPlugin = string;
196
196
  type NamedPreset = string;
197
197
  type OutputConfig = NamedPlugin | ConfiguredPlugin;
198
+ type PresetNamesBase = 'client' | 'near-operation-file' | 'gql-tag-operations' | 'graphql-modules' | 'import-types-preset';
199
+ type PresetNames = `${PresetNamesBase}-preset` | PresetNamesBase;
198
200
  /**
199
201
  * @additionalProperties false
200
202
  */
@@ -219,7 +221,7 @@ export declare namespace Types {
219
221
  *
220
222
  * List of available presets: https://graphql-code-generator.com/docs/presets/presets-index
221
223
  */
222
- preset?: string | OutputPreset;
224
+ preset?: PresetNames | OutputPreset;
223
225
  /**
224
226
  * @description If your setup uses Preset to have a more dynamic setup and output, set the configuration object of your preset here.
225
227
  *
@@ -303,6 +305,7 @@ export declare namespace Types {
303
305
  };
304
306
  type OutputPreset<TPresetConfig = any> = {
305
307
  buildGeneratesSection: (options: PresetFnArgs<TPresetConfig>) => Promisable<GenerateOptions[]>;
308
+ prepareDocuments?: (outputFilePath: string, outputSpecificDocuments: Types.OperationDocument[]) => Promisable<Types.OperationDocument[]>;
306
309
  };
307
310
  type RequireExtension = InstanceOrArray<string>;
308
311
  type PackageLoaderFn<TExpectedResult> = (name: string) => Promisable<TExpectedResult>;