@graphql-codegen/c-sharp-operations 4.0.1 → 5.0.0-alpha-20261107083142-77ea4f8b9896e3dbdfe60d40f9d95418e36ceaec

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/index.js CHANGED
@@ -40,7 +40,7 @@ exports.plugin = plugin;
40
40
  exports.addToSchema = (0, graphql_tag_1.default) `
41
41
  directive @namedClient(name: String!) on OBJECT | FIELD
42
42
  `;
43
- const validate = async (schema, documents, config, outputFile) => {
43
+ const validate = async (schema, documents, config, { outputFile }) => {
44
44
  if ((0, path_1.extname)(outputFile) !== '.cs') {
45
45
  throw new Error(`Plugin "c-sharp-operations" requires extension to be ".cs"!`);
46
46
  }
package/cjs/visitor.js CHANGED
@@ -80,7 +80,7 @@ class CSharpOperationsVisitor extends visitor_plugin_common_1.ClientSideBaseVisi
80
80
  node.kind === 'OperationDefinition';
81
81
  const fragmentNames = this._extractFragments(node, includeNestedFragments);
82
82
  const fragments = this._transformFragments(fragmentNames);
83
- const doc = this._prepareDocument([(0, graphql_1.print)(node), this._includeFragments(fragments)].join('\n'));
83
+ const doc = this._prepareDocument([(0, graphql_1.print)(node), this._includeFragments(fragments, node.kind)].join('\n'));
84
84
  return doc.replace(/"/g, '""');
85
85
  }
86
86
  _getDocumentNodeVariable(node, documentVariableName) {
package/esm/index.js CHANGED
@@ -34,7 +34,7 @@ export const plugin = (schema, documents, config) => {
34
34
  export const addToSchema = gql `
35
35
  directive @namedClient(name: String!) on OBJECT | FIELD
36
36
  `;
37
- export const validate = async (schema, documents, config, outputFile) => {
37
+ export const validate = async (schema, documents, config, { outputFile }) => {
38
38
  if (extname(outputFile) !== '.cs') {
39
39
  throw new Error(`Plugin "c-sharp-operations" requires extension to be ".cs"!`);
40
40
  }
package/esm/visitor.js CHANGED
@@ -76,7 +76,7 @@ export class CSharpOperationsVisitor extends ClientSideBaseVisitor {
76
76
  node.kind === 'OperationDefinition';
77
77
  const fragmentNames = this._extractFragments(node, includeNestedFragments);
78
78
  const fragments = this._transformFragments(fragmentNames);
79
- const doc = this._prepareDocument([print(node), this._includeFragments(fragments)].join('\n'));
79
+ const doc = this._prepareDocument([print(node), this._includeFragments(fragments, node.kind)].join('\n'));
80
80
  return doc.replace(/"/g, '""');
81
81
  }
82
82
  _getDocumentNodeVariable(node, documentVariableName) {
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@graphql-codegen/c-sharp-operations",
3
- "version": "4.0.1",
3
+ "version": "5.0.0-alpha-20261107083142-77ea4f8b9896e3dbdfe60d40f9d95418e36ceaec",
4
4
  "description": "GraphQL Code Generator plugin for generating CSharp code based on GraphQL operations",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
7
- "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
+ "graphql": "^16.0.0 || ^17.0.0",
8
8
  "graphql-tag": "2.12.6"
9
9
  },
10
10
  "dependencies": {
11
- "@graphql-codegen/c-sharp-common": "2.0.1",
12
- "@graphql-codegen/plugin-helpers": "^6.3.0",
13
- "@graphql-codegen/visitor-plugin-common": "^6.3.0",
11
+ "@graphql-codegen/c-sharp-common": "3.0.0-alpha-20261107083142-77ea4f8b9896e3dbdfe60d40f9d95418e36ceaec",
12
+ "@graphql-codegen/plugin-helpers": "^8.0.0",
13
+ "@graphql-codegen/visitor-plugin-common": "^8.0.0",
14
14
  "auto-bind": "~4.0.0",
15
15
  "change-case-all": "1.0.15",
16
16
  "tslib": "^2.8.1"
@@ -18,7 +18,7 @@
18
18
  "repository": "git@github.com:dotansimha/graphql-code-generator-community.git",
19
19
  "license": "MIT",
20
20
  "engines": {
21
- "node": ">= 16.0.0"
21
+ "node": ">=22.18.0"
22
22
  },
23
23
  "main": "cjs/index.js",
24
24
  "module": "esm/index.js",
@@ -3,5 +3,5 @@ import { CSharpOperationsRawPluginConfig } from './config.cjs';
3
3
  import { CSharpOperationsVisitor } from './visitor.cjs';
4
4
  export declare const plugin: PluginFunction<CSharpOperationsRawPluginConfig>;
5
5
  export declare const addToSchema: import("graphql").DocumentNode;
6
- export declare const validate: PluginValidateFn<any>;
6
+ export declare const validate: PluginValidateFn<CSharpOperationsRawPluginConfig>;
7
7
  export { CSharpOperationsVisitor };
@@ -3,5 +3,5 @@ import { CSharpOperationsRawPluginConfig } from './config.js';
3
3
  import { CSharpOperationsVisitor } from './visitor.js';
4
4
  export declare const plugin: PluginFunction<CSharpOperationsRawPluginConfig>;
5
5
  export declare const addToSchema: import("graphql").DocumentNode;
6
- export declare const validate: PluginValidateFn<any>;
6
+ export declare const validate: PluginValidateFn<CSharpOperationsRawPluginConfig>;
7
7
  export { CSharpOperationsVisitor };