Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/programmatic-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
},
"dependencies": {
"@graphql-codegen/core": "6.0.0",
"@graphql-codegen/plugin-helpers": "7.0.0",
"@graphql-codegen/plugin-helpers": "7.0.1",
"@graphql-codegen/typed-document-node": "7.0.0",
"@graphql-codegen/typescript": "6.0.1",
"@graphql-codegen/typescript-operations": "6.0.2",
"@graphql-codegen/typescript-resolvers": "6.0.0",
"@graphql-codegen/typescript-resolvers": "6.0.1",
"@graphql-tools/graphql-file-loader": "^8.1.12",
"@graphql-tools/load": "8.1.10",
"@graphql-tools/schema": "10.0.33",
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript-resolvers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"devDependencies": {
"@graphql-codegen/cli": "7.0.0",
"@graphql-codegen/typescript": "6.0.1",
"@graphql-codegen/typescript-resolvers": "6.0.0"
"@graphql-codegen/typescript-resolvers": "6.0.1"
},
"bob": false
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"graphql": "16.14.0",
"husky": "9.1.7",
"jest-diff": "30.4.1",
"lint-staged": "17.0.3",
"lint-staged": "17.0.4",
"memfs": "4.57.2",
"patch-package": "8.0.1",
"prettier": "3.8.3",
Expand Down
13 changes: 13 additions & 0 deletions packages/plugins/typescript/resolvers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @graphql-codegen/typescript-resolvers

## 6.0.1

### Patch Changes

- [#10797](https://github.com/dotansimha/graphql-code-generator/pull/10797)
[`6ed420a`](https://github.com/dotansimha/graphql-code-generator/commit/6ed420a4c12f810b3b610cd2baad161ec96bde56)
Thanks [@eddeee888](https://github.com/eddeee888)! - Fix FederationTypes not having typesPrefix
and typesSuffix applied

- Updated dependencies
[[`6ed420a`](https://github.com/dotansimha/graphql-code-generator/commit/6ed420a4c12f810b3b610cd2baad161ec96bde56)]:
- @graphql-codegen/plugin-helpers@7.0.1

## 6.0.0

### Major Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/typescript/resolvers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphql-codegen/typescript-resolvers",
"version": "6.0.0",
"version": "6.0.1",
"type": "module",
"description": "GraphQL Code Generator plugin for generating TypeScript types for resolvers signature",
"repository": {
Expand Down Expand Up @@ -46,7 +46,7 @@
}
},
"dependencies": {
"@graphql-codegen/plugin-helpers": "^7.0.0",
"@graphql-codegen/plugin-helpers": "^7.0.1",
"@graphql-codegen/typescript": "^6.0.0",
"@graphql-codegen/visitor-plugin-common": "^7.0.0",
"@graphql-tools/utils": "^11.0.0",
Expand Down
21 changes: 19 additions & 2 deletions packages/plugins/typescript/resolvers/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import {
PluginFunction,
Types,
} from '@graphql-codegen/plugin-helpers';
import { parseMapper, type RootResolver } from '@graphql-codegen/visitor-plugin-common';
import {
convertFactory,
convertName as convertNameUtil,
parseMapper,
type RootResolver,
} from '@graphql-codegen/visitor-plugin-common';
import { TypeScriptResolversPluginConfig } from './config.js';
import { TypeScriptResolversVisitor } from './visitor.js';

Expand Down Expand Up @@ -88,7 +93,19 @@ export type Resolver${capitalizedDirectiveName}WithResolve<TResult, TParent, TCo
}

let { transformedSchema, federationMeta } = config.federation
? addFederationReferencesToSchema(schema)
? (() => {
const baseConvert = convertFactory(config);
return addFederationReferencesToSchema(schema, {
convertName: name =>
convertNameUtil({
convert: () => baseConvert(name),
options: {
typesPrefix: config.typesPrefix || '',
typesSuffix: config.typesSuffix || '',
},
}),
});
})()
: { transformedSchema: schema, federationMeta: {} };

transformedSchema = config.customDirectives?.semanticNonNull
Expand Down
Loading
Loading