@graphql-inspector/core 4.2.0 → 4.2.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/validate/index.js
CHANGED
|
@@ -7,7 +7,7 @@ const document_js_1 = require("../ast/document.js");
|
|
|
7
7
|
const apollo_js_1 = require("../utils/apollo.js");
|
|
8
8
|
const graphql_js_1 = require("../utils/graphql.js");
|
|
9
9
|
const alias_count_js_1 = require("./alias-count.js");
|
|
10
|
-
const
|
|
10
|
+
const complexity_js_1 = require("./complexity.js");
|
|
11
11
|
const directive_count_js_1 = require("./directive-count.js");
|
|
12
12
|
const query_depth_js_1 = require("./query-depth.js");
|
|
13
13
|
const token_count_js_1 = require("./token-count.js");
|
|
@@ -72,7 +72,7 @@ function validate(schema, sources, options) {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
if (config.validateComplexityConfig) {
|
|
75
|
-
const complexityScoreError = (0,
|
|
75
|
+
const complexityScoreError = (0, complexity_js_1.validateComplexity)({
|
|
76
76
|
source: doc.source,
|
|
77
77
|
doc: transformedDoc,
|
|
78
78
|
maxComplexityScore: config.validateComplexityConfig.maxComplexityScore,
|
package/esm/validate/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { readDocument } from '../ast/document.js';
|
|
|
4
4
|
import { transformDocumentWithApollo, transformSchemaWithApollo } from '../utils/apollo.js';
|
|
5
5
|
import { findDeprecatedUsages } from '../utils/graphql.js';
|
|
6
6
|
import { validateAliasCount } from './alias-count.js';
|
|
7
|
-
import { validateComplexity } from './complexity';
|
|
7
|
+
import { validateComplexity } from './complexity.js';
|
|
8
8
|
import { validateDirectiveCount } from './directive-count.js';
|
|
9
9
|
import { validateQueryDepth } from './query-depth.js';
|
|
10
10
|
import { validateTokenCount } from './token-count.js';
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GraphQLError, GraphQLSchema, Source } from 'graphql';
|
|
2
|
-
import { ValidateOperationComplexityConfig } from './complexity';
|
|
2
|
+
import { ValidateOperationComplexityConfig } from './complexity.cjs';
|
|
3
3
|
export interface InvalidDocument {
|
|
4
4
|
source: Source;
|
|
5
5
|
errors: GraphQLError[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GraphQLError, GraphQLSchema, Source } from 'graphql';
|
|
2
|
-
import { ValidateOperationComplexityConfig } from './complexity';
|
|
2
|
+
import { ValidateOperationComplexityConfig } from './complexity.js';
|
|
3
3
|
export interface InvalidDocument {
|
|
4
4
|
source: Source;
|
|
5
5
|
errors: GraphQLError[];
|