@graphql-codegen/plugin-helpers 2.3.0 → 2.3.3-alpha-bc33c031d.0

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/helpers.d.ts CHANGED
@@ -2,7 +2,7 @@ import { Types } from './types';
2
2
  import { DocumentNode, GraphQLSchema, GraphQLOutputType } from 'graphql';
3
3
  export declare function isOutputConfigArray(type: any): type is Types.OutputConfig[];
4
4
  export declare function isConfiguredOutput(type: any): type is Types.ConfiguredOutput;
5
- export declare function normalizeOutputParam(config: Types.OutputConfig | Types.ConfiguredOutput): Types.ConfiguredOutput;
5
+ export declare function normalizeOutputParam(config: Types.OutputConfig | Types.ConfiguredPlugin[] | Types.ConfiguredOutput): Types.ConfiguredOutput;
6
6
  export declare function normalizeInstanceOrArray<T>(type: T | T[]): T[];
7
7
  export declare function normalizeConfig(config: Types.OutputConfig | Types.OutputConfig[]): Types.ConfiguredPlugin[];
8
8
  export declare function hasNullableTypeRecursively(type: GraphQLOutputType): boolean;
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@graphql-codegen/plugin-helpers",
3
- "version": "2.3.0",
3
+ "version": "2.3.3-alpha-bc33c031d.0",
4
4
  "description": "GraphQL Code Generator common utils and types",
5
5
  "peerDependencies": {
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"
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
  },
8
8
  "dependencies": {
9
- "@graphql-tools/utils": "^8.1.1",
9
+ "@graphql-tools/utils": "^8.5.2",
10
10
  "change-case-all": "1.0.14",
11
- "common-tags": "1.8.0",
11
+ "common-tags": "1.8.2",
12
12
  "import-from": "4.0.0",
13
13
  "lodash": "~4.17.0",
14
14
  "tslib": "~2.3.0"
@@ -26,6 +26,7 @@
26
26
  "definition": "index.d.ts"
27
27
  },
28
28
  "exports": {
29
+ "./package.json": "./package.json",
29
30
  ".": {
30
31
  "require": "./index.js",
31
32
  "import": "./index.mjs"
package/types.d.ts CHANGED
@@ -180,7 +180,11 @@ export declare namespace Types {
180
180
  interface CustomDocumentLoader {
181
181
  [path: string]: CustomDocumentLoaderOptions;
182
182
  }
183
- type OperationDocument = OperationDocumentGlobPath | CustomDocumentLoader;
183
+ interface CustomDocumentRequire {
184
+ require: string;
185
+ config: object;
186
+ }
187
+ type OperationDocument = OperationDocumentGlobPath | CustomDocumentLoader | CustomDocumentRequire;
184
188
  type PluginConfig<T = any> = {
185
189
  [key: string]: T;
186
190
  };
@@ -367,7 +371,7 @@ export declare namespace Types {
367
371
  * For more details: https://graphql-code-generator.com/docs/getting-started/codegen-config
368
372
  */
369
373
  generates: {
370
- [outputPath: string]: ConfiguredOutput;
374
+ [outputPath: string]: ConfiguredOutput | ConfiguredPlugin[];
371
375
  };
372
376
  /**
373
377
  * @description A flag to overwrite files if they already exist when generating code (`true` by default).