@graphql-codegen/typescript-resolvers 6.0.0 → 6.0.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/cjs/index.js +12 -1
- package/esm/index.js +13 -2
- package/package.json +2 -2
package/cjs/index.js
CHANGED
|
@@ -92,7 +92,18 @@ export type Resolver${capitalizedDirectiveName}WithResolve<TResult, TParent, TCo
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
let { transformedSchema, federationMeta } = config.federation
|
|
95
|
-
? (
|
|
95
|
+
? (() => {
|
|
96
|
+
const baseConvert = (0, visitor_plugin_common_1.convertFactory)(config);
|
|
97
|
+
return (0, plugin_helpers_1.addFederationReferencesToSchema)(schema, {
|
|
98
|
+
convertName: name => (0, visitor_plugin_common_1.convertName)({
|
|
99
|
+
convert: () => baseConvert(name),
|
|
100
|
+
options: {
|
|
101
|
+
typesPrefix: config.typesPrefix || '',
|
|
102
|
+
typesSuffix: config.typesSuffix || '',
|
|
103
|
+
},
|
|
104
|
+
}),
|
|
105
|
+
});
|
|
106
|
+
})()
|
|
96
107
|
: { transformedSchema: schema, federationMeta: {} };
|
|
97
108
|
transformedSchema = config.customDirectives?.semanticNonNull
|
|
98
109
|
? await semanticToStrict(transformedSchema)
|
package/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { addFederationReferencesToSchema, getCachedDocumentNodeFromSchema, oldVisit, } from '@graphql-codegen/plugin-helpers';
|
|
2
|
-
import { parseMapper } from '@graphql-codegen/visitor-plugin-common';
|
|
2
|
+
import { convertFactory, convertName as convertNameUtil, parseMapper, } from '@graphql-codegen/visitor-plugin-common';
|
|
3
3
|
import { TypeScriptResolversVisitor } from './visitor.js';
|
|
4
4
|
const capitalize = (s) => s.charAt(0).toUpperCase() + s.slice(1);
|
|
5
5
|
export const plugin = async (schema, documents, config) => {
|
|
@@ -55,7 +55,18 @@ export type Resolver${capitalizedDirectiveName}WithResolve<TResult, TParent, TCo
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
let { transformedSchema, federationMeta } = config.federation
|
|
58
|
-
?
|
|
58
|
+
? (() => {
|
|
59
|
+
const baseConvert = convertFactory(config);
|
|
60
|
+
return addFederationReferencesToSchema(schema, {
|
|
61
|
+
convertName: name => convertNameUtil({
|
|
62
|
+
convert: () => baseConvert(name),
|
|
63
|
+
options: {
|
|
64
|
+
typesPrefix: config.typesPrefix || '',
|
|
65
|
+
typesSuffix: config.typesSuffix || '',
|
|
66
|
+
},
|
|
67
|
+
}),
|
|
68
|
+
});
|
|
69
|
+
})()
|
|
59
70
|
: { transformedSchema: schema, federationMeta: {} };
|
|
60
71
|
transformedSchema = config.customDirectives?.semanticNonNull
|
|
61
72
|
? await semanticToStrict(transformedSchema)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-resolvers",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"description": "GraphQL Code Generator plugin for generating TypeScript types for resolvers signature",
|
|
5
5
|
"peerDependenciesMeta": {
|
|
6
6
|
"graphql-sock": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"graphql-sock": "^1.0.0"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@graphql-codegen/plugin-helpers": "^7.0.
|
|
15
|
+
"@graphql-codegen/plugin-helpers": "^7.0.1",
|
|
16
16
|
"@graphql-codegen/typescript": "^6.0.0",
|
|
17
17
|
"@graphql-codegen/visitor-plugin-common": "^7.0.0",
|
|
18
18
|
"@graphql-tools/utils": "^11.0.0",
|