@graphql-codegen/plugin-helpers 2.5.0-alpha-252a8d50d.0 → 2.5.0-alpha-2fbcdb6d3.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/cjs/errors.js +18 -0
- package/cjs/federation.js +258 -0
- package/cjs/getCachedDocumentNodeFromSchema.js +5 -0
- package/cjs/helpers.js +169 -0
- package/cjs/index.js +14 -0
- package/cjs/oldVisit.js +20 -0
- package/cjs/package.json +1 -0
- package/cjs/profiler.js +50 -0
- package/cjs/resolve-external-module-and-fn.js +33 -0
- package/cjs/types.js +7 -0
- package/cjs/utils.js +36 -0
- package/esm/errors.js +13 -0
- package/esm/federation.js +251 -0
- package/esm/getCachedDocumentNodeFromSchema.js +2 -0
- package/esm/helpers.js +159 -0
- package/esm/index.js +9 -0
- package/esm/oldVisit.js +16 -0
- package/esm/profiler.js +45 -0
- package/esm/resolve-external-module-and-fn.js +28 -0
- package/esm/types.js +3 -0
- package/esm/utils.js +29 -0
- package/package.json +22 -15
- package/{errors.d.ts → typings/errors.d.ts} +0 -0
- package/{federation.d.ts → typings/federation.d.ts} +0 -0
- package/{getCachedDocumentNodeFromSchema.d.ts → typings/getCachedDocumentNodeFromSchema.d.ts} +0 -0
- package/{helpers.d.ts → typings/helpers.d.ts} +1 -1
- package/typings/index.d.ts +9 -0
- package/{oldVisit.d.ts → typings/oldVisit.d.ts} +0 -0
- package/{profiler.d.ts → typings/profiler.d.ts} +0 -0
- package/{resolve-external-module-and-fn.d.ts → typings/resolve-external-module-and-fn.d.ts} +0 -0
- package/{types.d.ts → typings/types.d.ts} +14 -14
- package/{utils.d.ts → typings/utils.d.ts} +1 -1
- package/index.d.ts +0 -9
- package/index.js +0 -588
- package/index.mjs +0 -560
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GraphQLSchema, DocumentNode } from 'graphql';
|
|
2
2
|
import { Source } from '@graphql-tools/utils';
|
|
3
|
-
import type { Profiler } from './profiler';
|
|
3
|
+
import type { Profiler } from './profiler.js';
|
|
4
4
|
export declare namespace Types {
|
|
5
5
|
interface GenerateOptions {
|
|
6
6
|
filename: string;
|
|
@@ -231,7 +231,7 @@ export declare namespace Types {
|
|
|
231
231
|
/**
|
|
232
232
|
* @description A flag to overwrite files if they already exist when generating code (`true` by default).
|
|
233
233
|
*
|
|
234
|
-
* For more details: https://graphql-code-generator.com/docs/
|
|
234
|
+
* For more details: https://graphql-code-generator.com/docs/config-reference/codegen-config
|
|
235
235
|
*/
|
|
236
236
|
overwrite?: boolean;
|
|
237
237
|
/**
|
|
@@ -246,7 +246,7 @@ export declare namespace Types {
|
|
|
246
246
|
*
|
|
247
247
|
* You can specify either a single file, or multiple.
|
|
248
248
|
*
|
|
249
|
-
* For more details: https://graphql-code-generator.com/docs/
|
|
249
|
+
* For more details: https://graphql-code-generator.com/docs/config-reference/documents-field
|
|
250
250
|
*/
|
|
251
251
|
documents?: InstanceOrArray<OperationDocument>;
|
|
252
252
|
/**
|
|
@@ -262,7 +262,7 @@ export declare namespace Types {
|
|
|
262
262
|
*
|
|
263
263
|
* You can specify either a single schema, or multiple, and GraphQL Code Generator will merge the schemas into a single schema.
|
|
264
264
|
*
|
|
265
|
-
* For more details: https://graphql-code-generator.com/docs/
|
|
265
|
+
* For more details: https://graphql-code-generator.com/docs/config-reference/schema-field
|
|
266
266
|
*/
|
|
267
267
|
schema?: InstanceOrArray<Schema>;
|
|
268
268
|
/**
|
|
@@ -271,14 +271,14 @@ export declare namespace Types {
|
|
|
271
271
|
*
|
|
272
272
|
* The options may vary depends on what plugins you are using.
|
|
273
273
|
*
|
|
274
|
-
* For more details: https://graphql-code-generator.com/docs/
|
|
274
|
+
* For more details: https://graphql-code-generator.com/docs/config-reference/config-field
|
|
275
275
|
*/
|
|
276
276
|
config?: PluginConfig;
|
|
277
277
|
/**
|
|
278
278
|
* @description Specifies scripts to run when events are happening in the codegen core.
|
|
279
279
|
* Hooks defined on that level will effect only the current output files.
|
|
280
280
|
*
|
|
281
|
-
* For more details: https://graphql-code-generator.com/docs/
|
|
281
|
+
* For more details: https://graphql-code-generator.com/docs/config-reference/lifecycle-hooks
|
|
282
282
|
*/
|
|
283
283
|
hooks?: Partial<LifecycleHooksDefinition>;
|
|
284
284
|
}
|
|
@@ -324,14 +324,14 @@ export declare namespace Types {
|
|
|
324
324
|
*
|
|
325
325
|
* You can specify either a single schema, or multiple, and GraphQL Code Generator will merge the schemas into a single schema.
|
|
326
326
|
*
|
|
327
|
-
* For more details: https://graphql-code-generator.com/docs/
|
|
327
|
+
* For more details: https://graphql-code-generator.com/docs/config-reference/schema-field
|
|
328
328
|
*/
|
|
329
329
|
schema?: InstanceOrArray<Schema>;
|
|
330
330
|
/**
|
|
331
331
|
* @description A path to a file which defines custom Node.JS require() handlers for custom file extensions.
|
|
332
332
|
* This is essential if the code generator has to go through files which require other files in an unsupported format (by default).
|
|
333
333
|
*
|
|
334
|
-
* For more details: https://graphql-code-generator.com/docs/
|
|
334
|
+
* For more details: https://graphql-code-generator.com/docs/config-reference/require-field
|
|
335
335
|
* See more information about require.extensions: https://gist.github.com/jamestalmage/df922691475cff66c7e6.
|
|
336
336
|
*
|
|
337
337
|
* Note: values that specified in your .yml file will get loaded after loading the config .yml file.
|
|
@@ -354,7 +354,7 @@ export declare namespace Types {
|
|
|
354
354
|
*
|
|
355
355
|
* You can specify either a single file, or multiple.
|
|
356
356
|
*
|
|
357
|
-
* For more details: https://graphql-code-generator.com/docs/
|
|
357
|
+
* For more details: https://graphql-code-generator.com/docs/config-reference/documents-field
|
|
358
358
|
*/
|
|
359
359
|
documents?: InstanceOrArray<OperationDocument>;
|
|
360
360
|
/**
|
|
@@ -365,13 +365,13 @@ export declare namespace Types {
|
|
|
365
365
|
*
|
|
366
366
|
* The options may vary depends on what plugins you are using.
|
|
367
367
|
*
|
|
368
|
-
* For more details: https://graphql-code-generator.com/docs/
|
|
368
|
+
* For more details: https://graphql-code-generator.com/docs/config-reference/config-field
|
|
369
369
|
*/
|
|
370
370
|
config?: PluginConfig;
|
|
371
371
|
/**
|
|
372
372
|
* @description A map where the key represents an output path for the generated code and the value represents a set of options which are relevant for that specific file.
|
|
373
373
|
*
|
|
374
|
-
* For more details: https://graphql-code-generator.com/docs/
|
|
374
|
+
* For more details: https://graphql-code-generator.com/docs/config-reference/codegen-config
|
|
375
375
|
*/
|
|
376
376
|
generates: {
|
|
377
377
|
[outputPath: string]: ConfiguredOutput | ConfiguredPlugin[];
|
|
@@ -379,7 +379,7 @@ export declare namespace Types {
|
|
|
379
379
|
/**
|
|
380
380
|
* @description A flag to overwrite files if they already exist when generating code (`true` by default).
|
|
381
381
|
*
|
|
382
|
-
* For more details: https://graphql-code-generator.com/docs/
|
|
382
|
+
* For more details: https://graphql-code-generator.com/docs/config-reference/codegen-config
|
|
383
383
|
*/
|
|
384
384
|
overwrite?: boolean;
|
|
385
385
|
/**
|
|
@@ -422,7 +422,7 @@ export declare namespace Types {
|
|
|
422
422
|
/**
|
|
423
423
|
* @description Allows you to override the configuration for `@graphql-tools/graphql-tag-pluck`, the tool that extracts your GraphQL operations from your code files.
|
|
424
424
|
*
|
|
425
|
-
* For more details: https://graphql-code-generator.com/docs/
|
|
425
|
+
* For more details: https://graphql-code-generator.com/docs/config-reference/documents-field#graphql-tag-pluck
|
|
426
426
|
*/
|
|
427
427
|
pluckConfig?: {
|
|
428
428
|
/**
|
|
@@ -451,7 +451,7 @@ export declare namespace Types {
|
|
|
451
451
|
* @description Specifies scripts to run when events are happening in the codegen core.
|
|
452
452
|
* Hooks defined on that level will effect all output files.
|
|
453
453
|
*
|
|
454
|
-
* For more details: https://graphql-code-generator.com/docs/
|
|
454
|
+
* For more details: https://graphql-code-generator.com/docs/config-reference/lifecycle-hooks
|
|
455
455
|
*/
|
|
456
456
|
hooks?: Partial<LifecycleHooksDefinition>;
|
|
457
457
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GraphQLOutputType, GraphQLNamedType, GraphQLNonNull, GraphQLList } from 'graphql';
|
|
2
|
-
import { Types } from './types';
|
|
2
|
+
import { Types } from './types.js';
|
|
3
3
|
export declare function mergeOutputs(content: Types.PluginOutput | Array<Types.PluginOutput>): string;
|
|
4
4
|
export declare function isWrapperType(t: GraphQLOutputType): t is GraphQLNonNull<any> | GraphQLList<any>;
|
|
5
5
|
export declare function getBaseType(type: GraphQLOutputType): GraphQLNamedType;
|
package/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { resolveExternalModuleAndFn } from './resolve-external-module-and-fn';
|
|
2
|
-
export * from './types';
|
|
3
|
-
export * from './utils';
|
|
4
|
-
export * from './helpers';
|
|
5
|
-
export * from './federation';
|
|
6
|
-
export * from './errors';
|
|
7
|
-
export * from './getCachedDocumentNodeFromSchema';
|
|
8
|
-
export * from './oldVisit';
|
|
9
|
-
export * from './profiler';
|