@graphql-inspector/core 3.3.0 → 3.4.1-alpha-20230111095532-bd016dc8
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/README.md +5 -3
- package/ast/document.d.ts +1 -1
- package/coverage/index.d.ts +1 -1
- package/diff/argument.d.ts +1 -1
- package/diff/changes/argument.d.ts +1 -1
- package/diff/changes/directive.d.ts +1 -1
- package/diff/changes/field.d.ts +1 -1
- package/diff/changes/input.d.ts +1 -1
- package/diff/changes/union.d.ts +1 -1
- package/diff/field.d.ts +1 -1
- package/diff/index.d.ts +1 -1
- package/diff/rules/index.d.ts +2 -2
- package/index.d.ts +10 -5
- package/index.js +790 -622
- package/index.mjs +786 -623
- package/package.json +1 -1
- package/utils/graphql.d.ts +1 -1
- package/utils/{isDeprecated.d.ts → is-deprecated.d.ts} +1 -1
- package/validate/alias-count.d.ts +10 -0
- package/validate/complexity.d.ts +16 -0
- package/validate/directive-count.d.ts +10 -0
- package/validate/index.d.ts +18 -3
- package/validate/query-depth.d.ts +2 -1
- package/validate/token-count.d.ts +12 -0
package/README.md
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
[](https://circleci.com/gh/kamilkisiela/graphql-inspector)
|
|
4
4
|
[](https://npmjs.com/package/@graphql-inspector/core)
|
|
5
5
|
|
|
6
|
-
**GraphQL Inspector** ouputs a list of changes between two GraphQL schemas. Every change is
|
|
7
|
-
|
|
6
|
+
**GraphQL Inspector** ouputs a list of changes between two GraphQL schemas. Every change is
|
|
7
|
+
precisely explained and marked as breaking, non-breaking or dangerous. It helps you validate
|
|
8
|
+
documents and fragments against a schema and even find similar or duplicated types.
|
|
8
9
|
|
|
9
10
|
## Features
|
|
10
11
|
|
|
@@ -17,7 +18,8 @@ Major features:
|
|
|
17
18
|
- **Schema coverage based on documents**
|
|
18
19
|
- **Serves a GraphQL server with faked data and GraphQL Playground**
|
|
19
20
|
|
|
20
|
-
GraphQL Inspector has a **CLI** and also a **programatic API**, so you can use it however you want
|
|
21
|
+
GraphQL Inspector has a **CLI** and also a **programatic API**, so you can use it however you want
|
|
22
|
+
to and even build tools on top of it.
|
|
21
23
|
|
|
22
24
|
## Installation
|
|
23
25
|
|
package/ast/document.d.ts
CHANGED
package/coverage/index.d.ts
CHANGED
package/diff/argument.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { GraphQLArgument,
|
|
1
|
+
import { GraphQLArgument, GraphQLField, GraphQLInterfaceType, GraphQLObjectType } from 'graphql';
|
|
2
2
|
import { AddChange } from './schema';
|
|
3
3
|
export declare function changesInArgument(type: GraphQLObjectType | GraphQLInterfaceType, field: GraphQLField<any, any, any>, oldArg: GraphQLArgument, newArg: GraphQLArgument, addChange: AddChange): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GraphQLArgument,
|
|
1
|
+
import { GraphQLArgument, GraphQLField, GraphQLInterfaceType, GraphQLObjectType } from 'graphql';
|
|
2
2
|
import { Change } from './change';
|
|
3
3
|
export declare function fieldArgumentDescriptionChanged(type: GraphQLObjectType | GraphQLInterfaceType, field: GraphQLField<any, any, any>, oldArg: GraphQLArgument, newArg: GraphQLArgument): Change;
|
|
4
4
|
export declare function fieldArgumentDefaultChanged(type: GraphQLObjectType | GraphQLInterfaceType, field: GraphQLField<any, any, any>, oldArg: GraphQLArgument, newArg: GraphQLArgument): Change;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DirectiveLocationEnum, GraphQLArgument, GraphQLDirective } from 'graphql';
|
|
2
2
|
import { Change } from './change';
|
|
3
3
|
export declare function directiveRemoved(directive: GraphQLDirective): Change;
|
|
4
4
|
export declare function directiveAdded(directive: GraphQLDirective): Change;
|
package/diff/changes/field.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GraphQLArgument, GraphQLField, GraphQLInterfaceType, GraphQLObjectType } from 'graphql';
|
|
2
2
|
import { Change } from './change';
|
|
3
3
|
export declare function fieldRemoved(type: GraphQLObjectType | GraphQLInterfaceType, field: GraphQLField<any, any, any>): Change;
|
|
4
4
|
export declare function fieldAdded(type: GraphQLObjectType | GraphQLInterfaceType, field: GraphQLField<any, any, any>): Change;
|
package/diff/changes/input.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GraphQLInputField, GraphQLInputObjectType } from 'graphql';
|
|
2
2
|
import { Change } from './change';
|
|
3
3
|
export declare function inputFieldRemoved(input: GraphQLInputObjectType, field: GraphQLInputField): Change;
|
|
4
4
|
export declare function inputFieldAdded(input: GraphQLInputObjectType, field: GraphQLInputField): Change;
|
package/diff/changes/union.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GraphQLObjectType, GraphQLUnionType } from 'graphql';
|
|
2
2
|
import { Change } from './change';
|
|
3
3
|
export declare function unionMemberRemoved(union: GraphQLUnionType, type: GraphQLObjectType): Change;
|
|
4
4
|
export declare function unionMemberAdded(union: GraphQLUnionType, type: GraphQLObjectType): Change;
|
package/diff/field.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { GraphQLField,
|
|
1
|
+
import { GraphQLField, GraphQLInterfaceType, GraphQLObjectType } from 'graphql';
|
|
2
2
|
import { AddChange } from './schema';
|
|
3
3
|
export declare function changesInField(type: GraphQLObjectType | GraphQLInterfaceType, oldField: GraphQLField<any, any>, newField: GraphQLField<any, any>, addChange: AddChange): void;
|
package/diff/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GraphQLSchema } from 'graphql';
|
|
2
2
|
import { Change } from './changes/change';
|
|
3
|
-
import { Rule } from './rules/types';
|
|
4
3
|
import * as rules from './rules';
|
|
4
|
+
import { Rule } from './rules/types';
|
|
5
5
|
export * from './rules/types';
|
|
6
6
|
export declare const DiffRule: typeof rules;
|
|
7
7
|
export * from './onComplete/types';
|
package/diff/rules/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
export * from './consider-usage';
|
|
1
2
|
export * from './dangerous-breaking';
|
|
2
|
-
export * from './suppress-removal-of-deprecated-field';
|
|
3
3
|
export * from './ignore-description-changes';
|
|
4
|
-
export * from './consider-usage';
|
|
5
4
|
export * from './safe-unreachable';
|
|
5
|
+
export * from './suppress-removal-of-deprecated-field';
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
export { diff, DiffRule, Rule, CompletionArgs, CompletionHandler, UsageHandler, } from './diff';
|
|
2
|
-
export { validate, InvalidDocument } from './validate';
|
|
3
|
-
export { similar, SimilarMap } from './similar';
|
|
4
1
|
export * from './coverage';
|
|
5
|
-
export {
|
|
2
|
+
export { CompletionArgs, CompletionHandler, diff, DiffRule, Rule, UsageHandler } from './diff';
|
|
3
|
+
export { Change, ChangeType, Criticality, CriticalityLevel } from './diff/changes/change';
|
|
4
|
+
export { similar, SimilarMap } from './similar';
|
|
6
5
|
export { getTypePrefix } from './utils/graphql';
|
|
7
|
-
export {
|
|
6
|
+
export { BestMatch, Rating, Target } from './utils/string';
|
|
7
|
+
export { InvalidDocument, validate } from './validate';
|
|
8
|
+
export { countAliases } from './validate/alias-count';
|
|
9
|
+
export { calculateOperationComplexity, CalculateOperationComplexityConfig, } from './validate/complexity';
|
|
10
|
+
export { countDirectives } from './validate/directive-count';
|
|
11
|
+
export { countDepth } from './validate/query-depth';
|
|
12
|
+
export { calculateTokenCount } from './validate/token-count';
|