@graphql-codegen/visitor-plugin-common 5.8.0-alpha-20250320115712-0c95c1869f1781093936579f0f8ebc1091082c5c → 5.8.0-alpha-20250320120109-28908ffcc6ecf4a9c25a8536be031463a200b604
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.
|
@@ -47,9 +47,6 @@ class BaseResolversVisitor extends base_visitor_js_1.BaseVisitor {
|
|
|
47
47
|
},
|
|
48
48
|
resolversNonOptionalTypename: normalizeResolversNonOptionalTypename((0, utils_js_1.getConfigValue)(rawConfig.resolversNonOptionalTypename, false)),
|
|
49
49
|
avoidCheckingAbstractTypesRecursively: (0, utils_js_1.getConfigValue)(rawConfig.avoidCheckingAbstractTypesRecursively, false),
|
|
50
|
-
customDirectives: {
|
|
51
|
-
semanticNonNull: rawConfig.customDirectives?.semanticNonNull ?? false,
|
|
52
|
-
},
|
|
53
50
|
...additionalConfig,
|
|
54
51
|
});
|
|
55
52
|
this._schema = _schema;
|
|
@@ -719,12 +716,6 @@ class BaseResolversVisitor extends base_visitor_js_1.BaseVisitor {
|
|
|
719
716
|
applyOptionalFields(argsType, _fields) {
|
|
720
717
|
return `Partial<${argsType}>`;
|
|
721
718
|
}
|
|
722
|
-
clearOptional(str) {
|
|
723
|
-
if (str.startsWith('Maybe')) {
|
|
724
|
-
return str.replace(/Maybe<(.*?)>$/, '$1');
|
|
725
|
-
}
|
|
726
|
-
return str;
|
|
727
|
-
}
|
|
728
719
|
ObjectTypeDefinition(node) {
|
|
729
720
|
const declarationKind = 'type';
|
|
730
721
|
const name = this.convertName(node, {
|
|
@@ -43,9 +43,6 @@ export class BaseResolversVisitor extends BaseVisitor {
|
|
|
43
43
|
},
|
|
44
44
|
resolversNonOptionalTypename: normalizeResolversNonOptionalTypename(getConfigValue(rawConfig.resolversNonOptionalTypename, false)),
|
|
45
45
|
avoidCheckingAbstractTypesRecursively: getConfigValue(rawConfig.avoidCheckingAbstractTypesRecursively, false),
|
|
46
|
-
customDirectives: {
|
|
47
|
-
semanticNonNull: rawConfig.customDirectives?.semanticNonNull ?? false,
|
|
48
|
-
},
|
|
49
46
|
...additionalConfig,
|
|
50
47
|
});
|
|
51
48
|
this._schema = _schema;
|
|
@@ -715,12 +712,6 @@ export class BaseResolversVisitor extends BaseVisitor {
|
|
|
715
712
|
applyOptionalFields(argsType, _fields) {
|
|
716
713
|
return `Partial<${argsType}>`;
|
|
717
714
|
}
|
|
718
|
-
clearOptional(str) {
|
|
719
|
-
if (str.startsWith('Maybe')) {
|
|
720
|
-
return str.replace(/Maybe<(.*?)>$/, '$1');
|
|
721
|
-
}
|
|
722
|
-
return str;
|
|
723
|
-
}
|
|
724
715
|
ObjectTypeDefinition(node) {
|
|
725
716
|
const declarationKind = 'type';
|
|
726
717
|
const name = this.convertName(node, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/visitor-plugin-common",
|
|
3
|
-
"version": "5.8.0-alpha-
|
|
3
|
+
"version": "5.8.0-alpha-20250320120109-28908ffcc6ecf4a9c25a8536be031463a200b604",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"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"
|
|
6
6
|
},
|
|
@@ -32,9 +32,6 @@ export interface ParsedResolversConfig extends ParsedConfig {
|
|
|
32
32
|
directiveResolverMappings: Record<string, string>;
|
|
33
33
|
resolversNonOptionalTypename: ResolversNonOptionalTypenameConfig;
|
|
34
34
|
avoidCheckingAbstractTypesRecursively: boolean;
|
|
35
|
-
customDirectives: {
|
|
36
|
-
semanticNonNull: boolean;
|
|
37
|
-
};
|
|
38
35
|
}
|
|
39
36
|
type FieldDefinitionPrintFn = (parentName: string, avoidResolverOptionals: boolean) => string | null;
|
|
40
37
|
export interface RootResolver {
|
|
@@ -749,7 +746,6 @@ export declare class BaseResolversVisitor<TRawConfig extends RawResolversConfig
|
|
|
749
746
|
private getContextType;
|
|
750
747
|
protected applyRequireFields(argsType: string, fields: InputValueDefinitionNode[]): string;
|
|
751
748
|
protected applyOptionalFields(argsType: string, _fields: readonly InputValueDefinitionNode[]): string;
|
|
752
|
-
protected clearOptional(str: string): string;
|
|
753
749
|
ObjectTypeDefinition(node: ObjectTypeDefinitionNode): string;
|
|
754
750
|
UnionTypeDefinition(node: UnionTypeDefinitionNode, key: string | number, parent: any): string;
|
|
755
751
|
ScalarTypeDefinition(node: ScalarTypeDefinitionNode): string;
|
|
@@ -32,9 +32,6 @@ export interface ParsedResolversConfig extends ParsedConfig {
|
|
|
32
32
|
directiveResolverMappings: Record<string, string>;
|
|
33
33
|
resolversNonOptionalTypename: ResolversNonOptionalTypenameConfig;
|
|
34
34
|
avoidCheckingAbstractTypesRecursively: boolean;
|
|
35
|
-
customDirectives: {
|
|
36
|
-
semanticNonNull: boolean;
|
|
37
|
-
};
|
|
38
35
|
}
|
|
39
36
|
type FieldDefinitionPrintFn = (parentName: string, avoidResolverOptionals: boolean) => string | null;
|
|
40
37
|
export interface RootResolver {
|
|
@@ -749,7 +746,6 @@ export declare class BaseResolversVisitor<TRawConfig extends RawResolversConfig
|
|
|
749
746
|
private getContextType;
|
|
750
747
|
protected applyRequireFields(argsType: string, fields: InputValueDefinitionNode[]): string;
|
|
751
748
|
protected applyOptionalFields(argsType: string, _fields: readonly InputValueDefinitionNode[]): string;
|
|
752
|
-
protected clearOptional(str: string): string;
|
|
753
749
|
ObjectTypeDefinition(node: ObjectTypeDefinitionNode): string;
|
|
754
750
|
UnionTypeDefinition(node: UnionTypeDefinitionNode, key: string | number, parent: any): string;
|
|
755
751
|
ScalarTypeDefinition(node: ScalarTypeDefinitionNode): string;
|