@wundergraph/protographic 0.9.8 → 0.10.0
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/dist/src/naming-conventions.d.ts +20 -1
- package/dist/src/naming-conventions.js +27 -0
- package/dist/src/naming-conventions.js.map +1 -1
- package/dist/src/sdl-to-mapping-visitor.d.ts +17 -0
- package/dist/src/sdl-to-mapping-visitor.js +55 -7
- package/dist/src/sdl-to-mapping-visitor.js.map +1 -1
- package/dist/src/sdl-to-proto-visitor.d.ts +67 -0
- package/dist/src/sdl-to-proto-visitor.js +268 -5
- package/dist/src/sdl-to-proto-visitor.js.map +1 -1
- package/dist/src/sdl-validation-visitor.d.ts +94 -20
- package/dist/src/sdl-validation-visitor.js +258 -73
- package/dist/src/sdl-validation-visitor.js.map +1 -1
- package/dist/src/string-constants.d.ts +4 -0
- package/dist/src/string-constants.js +5 -0
- package/dist/src/string-constants.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
import { ASTNode, Kind } from 'graphql';
|
|
1
|
+
import { ASTNode, Kind, ListTypeNode, FieldDefinitionNode, ObjectTypeDefinitionNode } from 'graphql';
|
|
2
|
+
/**
|
|
3
|
+
* Type mapping from Kind enum values to their corresponding AST node types
|
|
4
|
+
*/
|
|
5
|
+
type KindToNodeTypeMap = {
|
|
6
|
+
[Kind.LIST_TYPE]: ListTypeNode;
|
|
7
|
+
[Kind.OBJECT_TYPE_DEFINITION]: ObjectTypeDefinitionNode;
|
|
8
|
+
[Kind.FIELD_DEFINITION]: FieldDefinitionNode;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Helper type to get the AST node type for a given Kind
|
|
12
|
+
*/
|
|
13
|
+
type NodeTypeForKind<K extends keyof KindToNodeTypeMap> = KindToNodeTypeMap[K];
|
|
2
14
|
/**
|
|
3
15
|
* Result of SDL validation containing categorized issues
|
|
4
16
|
*/
|
|
@@ -11,7 +23,7 @@ export interface ValidationResult {
|
|
|
11
23
|
/**
|
|
12
24
|
* Configuration for a specific validation rule with feature gate support
|
|
13
25
|
*/
|
|
14
|
-
interface
|
|
26
|
+
interface LintingRule<K extends keyof KindToNodeTypeMap = keyof KindToNodeTypeMap> {
|
|
15
27
|
/** Unique identifier for the validation rule */
|
|
16
28
|
name: string;
|
|
17
29
|
/** Human-readable description of what this rule validates */
|
|
@@ -19,14 +31,21 @@ interface FeatureGate {
|
|
|
19
31
|
/** Whether this validation rule is currently active */
|
|
20
32
|
enabled: boolean;
|
|
21
33
|
/** The AST node kind this rule applies to */
|
|
22
|
-
nodeKind:
|
|
34
|
+
nodeKind: K;
|
|
23
35
|
/** The validation function to execute for matching nodes */
|
|
24
|
-
validationFunction: ValidationFunction
|
|
36
|
+
validationFunction: ValidationFunction<K>;
|
|
25
37
|
}
|
|
38
|
+
type VisitContext<T extends ASTNode> = {
|
|
39
|
+
node: T;
|
|
40
|
+
key: string | number | undefined;
|
|
41
|
+
parent: ASTNode | ReadonlyArray<ASTNode> | undefined;
|
|
42
|
+
path: ReadonlyArray<string | number>;
|
|
43
|
+
ancestors: ReadonlyArray<ASTNode | ReadonlyArray<ASTNode>>;
|
|
44
|
+
};
|
|
26
45
|
/**
|
|
27
46
|
* Function signature for validation rules that process AST nodes
|
|
28
47
|
*/
|
|
29
|
-
type ValidationFunction = (
|
|
48
|
+
type ValidationFunction<K extends keyof KindToNodeTypeMap = keyof KindToNodeTypeMap> = (ctx: VisitContext<NodeTypeForKind<K>>) => void;
|
|
30
49
|
/**
|
|
31
50
|
* SDL (Schema Definition Language) validation visitor that validates GraphQL schemas
|
|
32
51
|
* against specific rules and constraints. Uses the visitor pattern to traverse
|
|
@@ -35,7 +54,8 @@ type ValidationFunction = (node: ASTNode) => void;
|
|
|
35
54
|
export declare class SDLValidationVisitor {
|
|
36
55
|
private readonly schema;
|
|
37
56
|
private readonly validationResult;
|
|
38
|
-
private
|
|
57
|
+
private lintingRules;
|
|
58
|
+
private visitor;
|
|
39
59
|
/**
|
|
40
60
|
* Creates a new SDL validation visitor for the given GraphQL schema
|
|
41
61
|
* @param schema - The GraphQL schema string to validate
|
|
@@ -46,7 +66,7 @@ export declare class SDLValidationVisitor {
|
|
|
46
66
|
* Each rule validates a specific aspect of the GraphQL schema
|
|
47
67
|
* @private
|
|
48
68
|
*/
|
|
49
|
-
private
|
|
69
|
+
private initializeLintingRules;
|
|
50
70
|
/**
|
|
51
71
|
* Perform validation by traversing the schema AST and applying all enabled validation rules
|
|
52
72
|
* @returns ValidationResult containing any errors and warnings found during validation
|
|
@@ -61,26 +81,19 @@ export declare class SDLValidationVisitor {
|
|
|
61
81
|
private createASTVisitor;
|
|
62
82
|
/**
|
|
63
83
|
* Execute all enabled validation rules that apply to the given AST node
|
|
64
|
-
* @param
|
|
84
|
+
* @param ctx - The AST node context to validate
|
|
65
85
|
* @private
|
|
66
86
|
*/
|
|
67
87
|
private executeValidationRules;
|
|
68
88
|
/**
|
|
69
89
|
* Validate list type nodes to ensure they don't contain nullable items
|
|
70
|
-
* @param
|
|
90
|
+
* @param ctx - The VisitContext containing the ListTypeNode to validate
|
|
71
91
|
* @private
|
|
72
92
|
*/
|
|
73
93
|
private validateListTypeNullability;
|
|
74
|
-
/**
|
|
75
|
-
* Get all validation rules that apply to the given AST node
|
|
76
|
-
* @param node - The AST node to check
|
|
77
|
-
* @returns Array of validation functions that should be executed for this node
|
|
78
|
-
* @private
|
|
79
|
-
*/
|
|
80
|
-
private getApplicableValidationRules;
|
|
81
94
|
/**
|
|
82
95
|
* Validate @key directives on object type definitions
|
|
83
|
-
* @param
|
|
96
|
+
* @param ctx - The VisitContext containing the object type definition node to validate
|
|
84
97
|
* @private
|
|
85
98
|
*/
|
|
86
99
|
private validateObjectTypeKeyDirectives;
|
|
@@ -91,11 +104,72 @@ export declare class SDLValidationVisitor {
|
|
|
91
104
|
*/
|
|
92
105
|
private validateKeyDirectives;
|
|
93
106
|
/**
|
|
94
|
-
* Validate
|
|
95
|
-
* @param
|
|
107
|
+
* Validate `@requires` directive usage (currently not supported)
|
|
108
|
+
* @param ctx - The VisitContext containing the field definition node to check for `@requires` directive
|
|
96
109
|
* @private
|
|
97
110
|
*/
|
|
98
111
|
private validateRequiresDirective;
|
|
112
|
+
/**
|
|
113
|
+
* Validate `@provides` directive usage. This is not supported in connect subgraphs.
|
|
114
|
+
* However `@requires` will be supported in the future.
|
|
115
|
+
* @param ctx - The VisitContext containing the field definition node to check for @provides directive
|
|
116
|
+
* @private
|
|
117
|
+
*/
|
|
118
|
+
private validateProvidesDirective;
|
|
119
|
+
/**
|
|
120
|
+
* Validate invalid resolver context usage
|
|
121
|
+
* @param ctx - The VisitContext containing the field definition node to check for invalid resolver context
|
|
122
|
+
* @private
|
|
123
|
+
*/
|
|
124
|
+
private validateInvalidResolverContext;
|
|
125
|
+
private getResolverContext;
|
|
126
|
+
/**
|
|
127
|
+
* Validate the context provided for the @resolved directive
|
|
128
|
+
* @param ctx - The VisitContext containing the field definition node to check for @resolved directive
|
|
129
|
+
* @param parent - The parent object type definition node
|
|
130
|
+
* @param node - The argument node for the @resolved directive
|
|
131
|
+
* @returns true if we need to continue with the validation, false otherwise
|
|
132
|
+
* @private
|
|
133
|
+
*/
|
|
134
|
+
private validateResolvedDirectiveContext;
|
|
135
|
+
/**
|
|
136
|
+
* Get the fields from the context value
|
|
137
|
+
* @param node - The argument node for the @resolved directive
|
|
138
|
+
* @returns The fields from the context value
|
|
139
|
+
* @private
|
|
140
|
+
*/
|
|
141
|
+
private getContextFields;
|
|
142
|
+
/**
|
|
143
|
+
* Check if a field is in the context of another field. This is used to detect cycles in the context.
|
|
144
|
+
* @param field - The field to check
|
|
145
|
+
* @param contextFields - The fields in the context
|
|
146
|
+
* @param typeFields - The fields in the parent
|
|
147
|
+
* @returns true if the field is in the context of another field, false otherwise
|
|
148
|
+
* @private
|
|
149
|
+
*/
|
|
150
|
+
private isFieldInOtherFieldContext;
|
|
151
|
+
private checkFieldCycle;
|
|
152
|
+
/**
|
|
153
|
+
* Get the underlying NamedTypeNode of a TypeNode
|
|
154
|
+
* @param type - The type node to get the underlying NamedTypeNode of
|
|
155
|
+
* @returns The underlying NamedTypeNode of the TypeNode
|
|
156
|
+
* @private
|
|
157
|
+
*/
|
|
158
|
+
private getUnderlyingType;
|
|
159
|
+
/**
|
|
160
|
+
* Get the fields of the parent object type definition
|
|
161
|
+
* @param parent - The parent object type definition node
|
|
162
|
+
* @returns The fields of the parent object type definition
|
|
163
|
+
* @private
|
|
164
|
+
*/
|
|
165
|
+
private getParentFields;
|
|
166
|
+
/**
|
|
167
|
+
* Check if the node is an AST object type definition node
|
|
168
|
+
* @param node - The node to check
|
|
169
|
+
* @returns true if the node is an AST object type definition node, false otherwise
|
|
170
|
+
* @private
|
|
171
|
+
*/
|
|
172
|
+
private isASTObjectTypeNode;
|
|
99
173
|
/**
|
|
100
174
|
* Enable or disable a specific validation rule by name
|
|
101
175
|
* @param ruleName - The name of the rule to configure
|
|
@@ -107,7 +181,7 @@ export declare class SDLValidationVisitor {
|
|
|
107
181
|
* Get information about all available validation rules
|
|
108
182
|
* @returns Array of rule configurations
|
|
109
183
|
*/
|
|
110
|
-
getAvailableRules(): Readonly<
|
|
184
|
+
getAvailableRules(): Readonly<LintingRule<any>[]>;
|
|
111
185
|
/**
|
|
112
186
|
* Check if the validation found any critical errors
|
|
113
187
|
* @returns true if errors were found, false otherwise
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Kind, parse, visit, } from 'graphql';
|
|
1
|
+
import { Kind, parse, visit, GraphQLID, } from 'graphql';
|
|
2
|
+
import { CONNECT_FIELD_RESOLVER, CONTEXT } from './string-constants.js';
|
|
2
3
|
/**
|
|
3
4
|
* SDL (Schema Definition Language) validation visitor that validates GraphQL schemas
|
|
4
5
|
* against specific rules and constraints. Uses the visitor pattern to traverse
|
|
@@ -10,49 +11,57 @@ export class SDLValidationVisitor {
|
|
|
10
11
|
* @param schema - The GraphQL schema string to validate
|
|
11
12
|
*/
|
|
12
13
|
constructor(schema) {
|
|
13
|
-
this.
|
|
14
|
+
this.lintingRules = [];
|
|
14
15
|
this.schema = schema;
|
|
15
16
|
this.validationResult = {
|
|
16
17
|
errors: [],
|
|
17
18
|
warnings: [],
|
|
18
19
|
};
|
|
19
|
-
this.
|
|
20
|
+
this.initializeLintingRules();
|
|
21
|
+
this.visitor = this.createASTVisitor();
|
|
20
22
|
}
|
|
21
23
|
/**
|
|
22
24
|
* Initialize the default set of validation rules (feature gates)
|
|
23
25
|
* Each rule validates a specific aspect of the GraphQL schema
|
|
24
26
|
* @private
|
|
25
27
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
28
|
+
initializeLintingRules() {
|
|
29
|
+
const objectTypeRule = {
|
|
30
|
+
name: 'nested-key-directives',
|
|
31
|
+
description: 'Validates that @key directives do not contain nested field selections',
|
|
32
|
+
enabled: true,
|
|
33
|
+
nodeKind: Kind.OBJECT_TYPE_DEFINITION,
|
|
34
|
+
validationFunction: (ctx) => this.validateObjectTypeKeyDirectives(ctx),
|
|
35
|
+
};
|
|
36
|
+
const listTypeRule = {
|
|
37
|
+
name: 'nullable-items-in-list-types',
|
|
38
|
+
description: 'Validates that list types do not contain nullable items',
|
|
39
|
+
enabled: true,
|
|
40
|
+
nodeKind: Kind.LIST_TYPE,
|
|
41
|
+
validationFunction: (ctx) => this.validateListTypeNullability(ctx),
|
|
42
|
+
};
|
|
43
|
+
const requiresRule = {
|
|
44
|
+
name: 'use-of-requires',
|
|
45
|
+
description: 'Validates usage of @requires directive which is not yet supported',
|
|
46
|
+
enabled: true,
|
|
47
|
+
nodeKind: Kind.FIELD_DEFINITION,
|
|
48
|
+
validationFunction: (ctx) => this.validateRequiresDirective(ctx),
|
|
49
|
+
};
|
|
50
|
+
const providesRule = {
|
|
51
|
+
name: 'use-of-provides',
|
|
52
|
+
description: 'Validates usage of @provides directive which is not yet supported',
|
|
53
|
+
enabled: true,
|
|
54
|
+
nodeKind: Kind.FIELD_DEFINITION,
|
|
55
|
+
validationFunction: (ctx) => this.validateProvidesDirective(ctx),
|
|
56
|
+
};
|
|
57
|
+
const resolverContextRule = {
|
|
58
|
+
name: 'use-of-invalid-resolver-context',
|
|
59
|
+
description: 'Validates whether a resolver context can be extracted from a type',
|
|
60
|
+
enabled: true,
|
|
61
|
+
nodeKind: Kind.FIELD_DEFINITION,
|
|
62
|
+
validationFunction: (ctx) => this.validateInvalidResolverContext(ctx),
|
|
63
|
+
};
|
|
64
|
+
this.lintingRules = [objectTypeRule, listTypeRule, requiresRule, providesRule, resolverContextRule];
|
|
56
65
|
}
|
|
57
66
|
/**
|
|
58
67
|
* Perform validation by traversing the schema AST and applying all enabled validation rules
|
|
@@ -65,8 +74,7 @@ export class SDLValidationVisitor {
|
|
|
65
74
|
if (!astNode) {
|
|
66
75
|
throw new Error('Schema parsing resulted in null AST');
|
|
67
76
|
}
|
|
68
|
-
|
|
69
|
-
visit(astNode, visitor);
|
|
77
|
+
visit(astNode, this.visitor);
|
|
70
78
|
return this.validationResult;
|
|
71
79
|
}
|
|
72
80
|
catch (error) {
|
|
@@ -90,44 +98,45 @@ export class SDLValidationVisitor {
|
|
|
90
98
|
/**
|
|
91
99
|
* Handle list type nodes - validate nullability rules
|
|
92
100
|
*/
|
|
93
|
-
ListType: (node) => {
|
|
94
|
-
this.executeValidationRules(node);
|
|
101
|
+
ListType: (node, key, parent, path, ancestors) => {
|
|
102
|
+
this.executeValidationRules({ node, key, parent, path, ancestors });
|
|
95
103
|
return node;
|
|
96
104
|
},
|
|
97
105
|
/**
|
|
98
106
|
* Handle object type definition nodes - validate directives
|
|
99
107
|
*/
|
|
100
|
-
ObjectTypeDefinition: (node) => {
|
|
101
|
-
this.executeValidationRules(node);
|
|
108
|
+
ObjectTypeDefinition: (node, key, parent, path, ancestors) => {
|
|
109
|
+
this.executeValidationRules({ node: node, key, parent, path, ancestors });
|
|
102
110
|
return node;
|
|
103
111
|
},
|
|
104
112
|
/**
|
|
105
113
|
* Handle field definition nodes - validate field-level directives
|
|
106
114
|
*/
|
|
107
|
-
FieldDefinition: (node) => {
|
|
108
|
-
this.executeValidationRules(node);
|
|
115
|
+
FieldDefinition: (node, key, parent, path, ancestors) => {
|
|
116
|
+
this.executeValidationRules({ node, key, parent, path, ancestors });
|
|
109
117
|
return node;
|
|
110
118
|
},
|
|
111
119
|
};
|
|
112
120
|
}
|
|
113
121
|
/**
|
|
114
122
|
* Execute all enabled validation rules that apply to the given AST node
|
|
115
|
-
* @param
|
|
123
|
+
* @param ctx - The AST node context to validate
|
|
116
124
|
* @private
|
|
117
125
|
*/
|
|
118
|
-
executeValidationRules(
|
|
119
|
-
const applicableRules = this.
|
|
120
|
-
for (const
|
|
121
|
-
|
|
126
|
+
executeValidationRules(ctx) {
|
|
127
|
+
const applicableRules = this.lintingRules.filter((rule) => rule.nodeKind === ctx.node.kind && rule.enabled);
|
|
128
|
+
for (const rule of applicableRules) {
|
|
129
|
+
// Type assertion is safe here because we've filtered by nodeKind
|
|
130
|
+
rule.validationFunction(ctx);
|
|
122
131
|
}
|
|
123
132
|
}
|
|
124
133
|
/**
|
|
125
134
|
* Validate list type nodes to ensure they don't contain nullable items
|
|
126
|
-
* @param
|
|
135
|
+
* @param ctx - The VisitContext containing the ListTypeNode to validate
|
|
127
136
|
* @private
|
|
128
137
|
*/
|
|
129
|
-
validateListTypeNullability(
|
|
130
|
-
let currentNode = node;
|
|
138
|
+
validateListTypeNullability(ctx) {
|
|
139
|
+
let currentNode = ctx.node;
|
|
131
140
|
// Traverse nested list types to find the innermost type.
|
|
132
141
|
while (currentNode.kind === Kind.LIST_TYPE) {
|
|
133
142
|
currentNode = currentNode.type;
|
|
@@ -145,31 +154,20 @@ export class SDLValidationVisitor {
|
|
|
145
154
|
}
|
|
146
155
|
// If the innermost type is a named type (not wrapped in NonNull), it's nullable
|
|
147
156
|
if (currentNode.kind === Kind.NAMED_TYPE) {
|
|
148
|
-
const sourceText = this.extractSourceText(node);
|
|
149
|
-
this.addWarning(`Nullable items are not supported in list types: ${sourceText}`, node.loc);
|
|
157
|
+
const sourceText = this.extractSourceText(ctx.node);
|
|
158
|
+
this.addWarning(`Nullable items are not supported in list types: ${sourceText}`, ctx.node.loc);
|
|
150
159
|
}
|
|
151
160
|
}
|
|
152
|
-
/**
|
|
153
|
-
* Get all validation rules that apply to the given AST node
|
|
154
|
-
* @param node - The AST node to check
|
|
155
|
-
* @returns Array of validation functions that should be executed for this node
|
|
156
|
-
* @private
|
|
157
|
-
*/
|
|
158
|
-
getApplicableValidationRules(node) {
|
|
159
|
-
return this.featureGates
|
|
160
|
-
.filter((gate) => gate.nodeKind === node.kind && gate.enabled)
|
|
161
|
-
.map((gate) => gate.validationFunction);
|
|
162
|
-
}
|
|
163
161
|
/**
|
|
164
162
|
* Validate @key directives on object type definitions
|
|
165
|
-
* @param
|
|
163
|
+
* @param ctx - The VisitContext containing the object type definition node to validate
|
|
166
164
|
* @private
|
|
167
165
|
*/
|
|
168
|
-
validateObjectTypeKeyDirectives(
|
|
169
|
-
if (!node.directives) {
|
|
166
|
+
validateObjectTypeKeyDirectives(ctx) {
|
|
167
|
+
if (!ctx.node.directives) {
|
|
170
168
|
return;
|
|
171
169
|
}
|
|
172
|
-
for (const directive of node.directives) {
|
|
170
|
+
for (const directive of ctx.node.directives) {
|
|
173
171
|
this.validateKeyDirectives(directive);
|
|
174
172
|
}
|
|
175
173
|
}
|
|
@@ -194,16 +192,203 @@ export class SDLValidationVisitor {
|
|
|
194
192
|
}
|
|
195
193
|
}
|
|
196
194
|
/**
|
|
197
|
-
* Validate
|
|
198
|
-
* @param
|
|
195
|
+
* Validate `@requires` directive usage (currently not supported)
|
|
196
|
+
* @param ctx - The VisitContext containing the field definition node to check for `@requires` directive
|
|
199
197
|
* @private
|
|
200
198
|
*/
|
|
201
|
-
validateRequiresDirective(
|
|
199
|
+
validateRequiresDirective(ctx) {
|
|
202
200
|
var _a;
|
|
203
|
-
const hasRequiresDirective = (_a = node.directives) === null || _a === void 0 ? void 0 : _a.some((directive) => directive.name.value === 'requires');
|
|
201
|
+
const hasRequiresDirective = (_a = ctx.node.directives) === null || _a === void 0 ? void 0 : _a.some((directive) => directive.name.value === 'requires');
|
|
204
202
|
if (hasRequiresDirective) {
|
|
205
|
-
this.addWarning('Use of requires is not supported yet', node.loc);
|
|
203
|
+
this.addWarning('Use of requires is not supported yet', ctx.node.loc);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Validate `@provides` directive usage. This is not supported in connect subgraphs.
|
|
208
|
+
* However `@requires` will be supported in the future.
|
|
209
|
+
* @param ctx - The VisitContext containing the field definition node to check for @provides directive
|
|
210
|
+
* @private
|
|
211
|
+
*/
|
|
212
|
+
validateProvidesDirective(ctx) {
|
|
213
|
+
var _a;
|
|
214
|
+
const hasProvidesDirective = (_a = ctx.node.directives) === null || _a === void 0 ? void 0 : _a.some((directive) => directive.name.value === 'provides');
|
|
215
|
+
if (hasProvidesDirective) {
|
|
216
|
+
this.addError('Use of provides is not supported in connect subgraphs', ctx.node.loc);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Validate invalid resolver context usage
|
|
221
|
+
* @param ctx - The VisitContext containing the field definition node to check for invalid resolver context
|
|
222
|
+
* @private
|
|
223
|
+
*/
|
|
224
|
+
validateInvalidResolverContext(ctx) {
|
|
225
|
+
var _a, _b, _c, _d;
|
|
226
|
+
if (ctx.node.name.value.startsWith('_') || ((_b = (_a = ctx.node.arguments) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) === 0) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
const parent = ctx.ancestors[ctx.ancestors.length - 1];
|
|
230
|
+
// If the parent is not an object type definition node, we don't need to continue with the validation
|
|
231
|
+
if (!this.isASTObjectTypeNode(parent)) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
if (parent.name.value === 'Query' || parent.name.value === 'Mutation' || parent.name.value === 'Subscription') {
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
const resolverContext = this.getResolverContext(ctx.node);
|
|
238
|
+
// If the context is invalid, we don't need to continue with the validation
|
|
239
|
+
if (!this.validateResolvedDirectiveContext(ctx, parent, resolverContext)) {
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
this.addWarning(`No @${CONNECT_FIELD_RESOLVER} directive found on the field ${ctx.node.name.value} - falling back to ID field`, ctx.node.loc);
|
|
243
|
+
const idFields = (_d = (_c = parent.fields) === null || _c === void 0 ? void 0 : _c.filter((field) => this.getUnderlyingType(field.type).name.value === GraphQLID.name)) !== null && _d !== void 0 ? _d : [];
|
|
244
|
+
switch (idFields.length) {
|
|
245
|
+
case 1:
|
|
246
|
+
return;
|
|
247
|
+
case 0:
|
|
248
|
+
this.addError('Invalid context provided for resolver. No fields with type ID found', ctx.node.loc);
|
|
249
|
+
return;
|
|
250
|
+
default:
|
|
251
|
+
this.addError(`Invalid context provided for resolver. Multiple fields with type ID found - provide a context with the fields you want to use in the @${CONNECT_FIELD_RESOLVER} directive`, ctx.node.loc);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
getResolverContext(node) {
|
|
255
|
+
var _a, _b, _c;
|
|
256
|
+
return (_c = (_b = (_a = node.directives) === null || _a === void 0 ? void 0 : _a.find((directive) => directive.name.value === CONNECT_FIELD_RESOLVER)) === null || _b === void 0 ? void 0 : _b.arguments) === null || _c === void 0 ? void 0 : _c.find((arg) => arg.name.value === CONTEXT);
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Validate the context provided for the @resolved directive
|
|
260
|
+
* @param ctx - The VisitContext containing the field definition node to check for @resolved directive
|
|
261
|
+
* @param parent - The parent object type definition node
|
|
262
|
+
* @param node - The argument node for the @resolved directive
|
|
263
|
+
* @returns true if we need to continue with the validation, false otherwise
|
|
264
|
+
* @private
|
|
265
|
+
*/
|
|
266
|
+
validateResolvedDirectiveContext(ctx, parent, node) {
|
|
267
|
+
if (!parent) {
|
|
268
|
+
this.addError('Invalid context provided for resolver. Could not determine parent type', ctx.node.loc);
|
|
269
|
+
return false;
|
|
206
270
|
}
|
|
271
|
+
const fieldNames = this.getContextFields(node);
|
|
272
|
+
if (fieldNames.length === 0)
|
|
273
|
+
return true;
|
|
274
|
+
const parentFields = this.getParentFields(parent);
|
|
275
|
+
if (parentFields.error) {
|
|
276
|
+
this.addError(parentFields.error, ctx.node.loc);
|
|
277
|
+
return false;
|
|
278
|
+
}
|
|
279
|
+
let invalidFields = [];
|
|
280
|
+
invalidFields = fieldNames.filter((field) => !parentFields.fields.some((f) => f.name.value === field));
|
|
281
|
+
if (invalidFields.length > 0) {
|
|
282
|
+
this.addError(`Invalid context provided for resolver. Context contains invalid fields: ${invalidFields.join(', ')}`, ctx.node.loc);
|
|
283
|
+
}
|
|
284
|
+
if (fieldNames.includes(ctx.node.name.value)) {
|
|
285
|
+
this.addError('Invalid context provided for resolver. Cannot contain resolver field in the context', ctx.node.loc);
|
|
286
|
+
}
|
|
287
|
+
const { hasCycle, path } = this.isFieldInOtherFieldContext(ctx.node, fieldNames, parentFields.fields);
|
|
288
|
+
if (hasCycle) {
|
|
289
|
+
this.addError(`Cycle detected in context: field "${ctx.node.name.value}" is referenced in the following path: "${path}"`, ctx.node.loc);
|
|
290
|
+
}
|
|
291
|
+
return false;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Get the fields from the context value
|
|
295
|
+
* @param node - The argument node for the @resolved directive
|
|
296
|
+
* @returns The fields from the context value
|
|
297
|
+
* @private
|
|
298
|
+
*/
|
|
299
|
+
getContextFields(node) {
|
|
300
|
+
if (!node)
|
|
301
|
+
return [];
|
|
302
|
+
let value = (node === null || node === void 0 ? void 0 : node.value.kind) === Kind.STRING ? node.value.value.trim() : '';
|
|
303
|
+
if (value.length === 0) {
|
|
304
|
+
return [];
|
|
305
|
+
}
|
|
306
|
+
return value
|
|
307
|
+
.split(/[,\s]+/)
|
|
308
|
+
.filter((field) => field.length > 0)
|
|
309
|
+
.map((field) => field.trim());
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Check if a field is in the context of another field. This is used to detect cycles in the context.
|
|
313
|
+
* @param field - The field to check
|
|
314
|
+
* @param contextFields - The fields in the context
|
|
315
|
+
* @param typeFields - The fields in the parent
|
|
316
|
+
* @returns true if the field is in the context of another field, false otherwise
|
|
317
|
+
* @private
|
|
318
|
+
*/
|
|
319
|
+
isFieldInOtherFieldContext(field, contextFields, typeFields) {
|
|
320
|
+
let visited = new Set();
|
|
321
|
+
return this.checkFieldCycle(field, contextFields, typeFields, visited, []);
|
|
322
|
+
}
|
|
323
|
+
checkFieldCycle(field, contextFields, typeFields, visited, currentPath) {
|
|
324
|
+
const fieldName = field.name.value;
|
|
325
|
+
if (visited.has(fieldName)) {
|
|
326
|
+
return { hasCycle: true, path: currentPath.join('.') };
|
|
327
|
+
}
|
|
328
|
+
currentPath.push(fieldName);
|
|
329
|
+
visited.add(fieldName);
|
|
330
|
+
for (const contextField of contextFields) {
|
|
331
|
+
if (contextField === fieldName)
|
|
332
|
+
continue;
|
|
333
|
+
let typeField = typeFields.find((p) => p.name.value === contextField);
|
|
334
|
+
if (!typeField)
|
|
335
|
+
continue;
|
|
336
|
+
const typeFieldContext = this.getResolverContext(typeField);
|
|
337
|
+
if (!typeFieldContext)
|
|
338
|
+
continue;
|
|
339
|
+
const typeFieldContextFields = this.getContextFields(typeFieldContext);
|
|
340
|
+
if (typeFieldContextFields.includes(fieldName)) {
|
|
341
|
+
return { hasCycle: true, path: [...currentPath, typeField.name.value].join('.') };
|
|
342
|
+
}
|
|
343
|
+
const checkCycleResult = this.checkFieldCycle(typeField, typeFieldContextFields, typeFields, visited, currentPath);
|
|
344
|
+
if (checkCycleResult.hasCycle) {
|
|
345
|
+
return checkCycleResult;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
currentPath.pop();
|
|
349
|
+
visited.delete(fieldName);
|
|
350
|
+
return { hasCycle: false, path: '' };
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Get the underlying NamedTypeNode of a TypeNode
|
|
354
|
+
* @param type - The type node to get the underlying NamedTypeNode of
|
|
355
|
+
* @returns The underlying NamedTypeNode of the TypeNode
|
|
356
|
+
* @private
|
|
357
|
+
*/
|
|
358
|
+
getUnderlyingType(type) {
|
|
359
|
+
while (type.kind !== Kind.NAMED_TYPE) {
|
|
360
|
+
type = type.type;
|
|
361
|
+
}
|
|
362
|
+
return type;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Get the fields of the parent object type definition
|
|
366
|
+
* @param parent - The parent object type definition node
|
|
367
|
+
* @returns The fields of the parent object type definition
|
|
368
|
+
* @private
|
|
369
|
+
*/
|
|
370
|
+
getParentFields(parent) {
|
|
371
|
+
var _a;
|
|
372
|
+
const result = { fields: [], error: '' };
|
|
373
|
+
if (!this.isASTObjectTypeNode(parent)) {
|
|
374
|
+
result.error = 'Invalid context provided for resolver. Could not determine parent type';
|
|
375
|
+
return result;
|
|
376
|
+
}
|
|
377
|
+
if (!parent.fields || parent.fields.length === 0) {
|
|
378
|
+
result.error = 'Invalid context provided for resolver. Parent type has no fields';
|
|
379
|
+
return result;
|
|
380
|
+
}
|
|
381
|
+
result.fields = Array.from((_a = parent.fields) !== null && _a !== void 0 ? _a : []);
|
|
382
|
+
return result;
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Check if the node is an AST object type definition node
|
|
386
|
+
* @param node - The node to check
|
|
387
|
+
* @returns true if the node is an AST object type definition node, false otherwise
|
|
388
|
+
* @private
|
|
389
|
+
*/
|
|
390
|
+
isASTObjectTypeNode(node) {
|
|
391
|
+
return !Array.isArray(node) && 'kind' in node && node.kind === Kind.OBJECT_TYPE_DEFINITION;
|
|
207
392
|
}
|
|
208
393
|
/**
|
|
209
394
|
* Enable or disable a specific validation rule by name
|
|
@@ -212,7 +397,7 @@ export class SDLValidationVisitor {
|
|
|
212
397
|
* @returns true if the rule was found and configured, false otherwise
|
|
213
398
|
*/
|
|
214
399
|
configureRule(ruleName, enabled) {
|
|
215
|
-
const rule = this.
|
|
400
|
+
const rule = this.lintingRules.find((gate) => gate.name === ruleName);
|
|
216
401
|
if (rule) {
|
|
217
402
|
rule.enabled = enabled;
|
|
218
403
|
return true;
|
|
@@ -224,7 +409,7 @@ export class SDLValidationVisitor {
|
|
|
224
409
|
* @returns Array of rule configurations
|
|
225
410
|
*/
|
|
226
411
|
getAvailableRules() {
|
|
227
|
-
return Object.freeze([...this.
|
|
412
|
+
return Object.freeze([...this.lintingRules]);
|
|
228
413
|
}
|
|
229
414
|
/**
|
|
230
415
|
* Check if the validation found any critical errors
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdl-validation-visitor.js","sourceRoot":"","sources":["../../src/sdl-validation-visitor.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,IAAI,EAGJ,KAAK,EAEL,KAAK,GAGN,MAAM,SAAS,CAAC;AAyCjB;;;;GAIG;AACH,MAAM,OAAO,oBAAoB;IAK/B;;;OAGG;IACH,YAAY,MAAc;QANlB,iBAAY,GAAkB,EAAE,CAAC;QAOvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,gBAAgB,GAAG;YACtB,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE,EAAE;SACb,C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