@graphql-codegen/named-operations-object 2.3.1-alpha-0814e49cc.0 → 2.3.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,13 +1,13 @@
1
1
  {
2
2
  "name": "@graphql-codegen/named-operations-object",
3
- "version": "2.3.1-alpha-0814e49cc.0",
3
+ "version": "2.3.1",
4
4
  "description": "GraphQL Code Generator plugin for generating an enum with all loaded operations, for simpler and type-safe access",
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",
10
+ "@graphql-codegen/plugin-helpers": "^2.6.2",
11
11
  "change-case-all": "1.0.14",
12
12
  "tslib": "~2.4.0"
13
13
  },
@@ -27,7 +27,7 @@
27
27
  "exports": {
28
28
  ".": {
29
29
  "require": {
30
- "types": "./typings/index.d.ts",
30
+ "types": "./typings/index.d.cts",
31
31
  "default": "./cjs/index.js"
32
32
  },
33
33
  "import": {
@@ -0,0 +1,25 @@
1
+ import { PluginFunction } from '@graphql-codegen/plugin-helpers';
2
+ export interface NamedOperationsObjectPluginConfig {
3
+ /**
4
+ * @description Allow you to customize the name of the exported identifier
5
+ * @default namedOperations
6
+ *
7
+ * @exampleMarkdown
8
+ * ```yaml
9
+ * generates:
10
+ * path/to/file.ts:
11
+ * plugins:
12
+ * - typescript
13
+ * - named-operations-object
14
+ * config:
15
+ * identifierName: ListAllOperations
16
+ * ```
17
+ */
18
+ identifierName?: string;
19
+ /**
20
+ * @description Will generate a const string instead of regular string.
21
+ * @default false
22
+ */
23
+ useConsts?: boolean;
24
+ }
25
+ export declare const plugin: PluginFunction<NamedOperationsObjectPluginConfig, string>;