@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 CHANGED
@@ -3,8 +3,9 @@
3
3
  [![CircleCI](https://circleci.com/gh/kamilkisiela/graphql-inspector.svg?style=shield&circle-token=d1cd06aba321ee2b7bf8bd2041104643639463b0)](https://circleci.com/gh/kamilkisiela/graphql-inspector)
4
4
  [![npm version](https://badge.fury.io/js/@graphql-inspector/core.svg)](https://npmjs.com/package/@graphql-inspector/core)
5
5
 
6
- **GraphQL Inspector** ouputs a list of changes between two GraphQL schemas. Every change is precisely explained and marked as breaking, non-breaking or dangerous.
7
- It helps you validate documents and fragments against a schema and even find similar or duplicated types.
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 to and even build tools on top of it.
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
@@ -1,4 +1,4 @@
1
- import { OperationDefinitionNode, FragmentDefinitionNode, Source } from 'graphql';
1
+ import { FragmentDefinitionNode, OperationDefinitionNode, Source } from 'graphql';
2
2
  export interface Document {
3
3
  source: Source;
4
4
  fragments: {
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema, GraphQLError, Source, GraphQLNamedType } from 'graphql';
1
+ import { GraphQLError, GraphQLNamedType, GraphQLSchema, Source } from 'graphql';
2
2
  export interface Location {
3
3
  start: number;
4
4
  end: number;
@@ -1,3 +1,3 @@
1
- import { GraphQLArgument, GraphQLObjectType, GraphQLField, GraphQLInterfaceType } from 'graphql';
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, GraphQLObjectType, GraphQLField, GraphQLInterfaceType } from 'graphql';
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 { GraphQLDirective, DirectiveLocationEnum, GraphQLArgument } from 'graphql';
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;
@@ -1,4 +1,4 @@
1
- import { GraphQLObjectType, GraphQLField, GraphQLArgument, GraphQLInterfaceType } from 'graphql';
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;
@@ -1,4 +1,4 @@
1
- import { GraphQLInputObjectType, GraphQLInputField } from 'graphql';
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;
@@ -1,4 +1,4 @@
1
- import { GraphQLUnionType, GraphQLObjectType } from 'graphql';
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, GraphQLObjectType, GraphQLInterfaceType } from 'graphql';
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';
@@ -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 { Change, CriticalityLevel, Criticality, ChangeType, } from './diff/changes/change';
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 { Target, Rating, BestMatch } from './utils/string';
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';