@graphql-inspector/core 0.0.0-canary.36985fe → 0.0.0-canary.36b26d2

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 precisely explained and
7
+ marked as breaking, non-breaking or dangerous. It helps you validate documents and fragments against a schema and even
8
+ 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 to and even build
22
+ tools on top of it.
21
23
 
22
24
  ## Installation
23
25
 
@@ -36,17 +38,17 @@ import {
36
38
  Change,
37
39
  InvalidDocument,
38
40
  SimilarMap,
39
- SchemaCoverage,
40
- } from '@graphql-inspector/core';
41
+ SchemaCoverage
42
+ } from '@graphql-inspector/core'
41
43
 
42
44
  // diff
43
- const changes: Change[] = diff(schemaA, schemaB);
45
+ const changes: Change[] = diff(schemaA, schemaB)
44
46
  // validate
45
- const invalid: InvalidDocument[] = validate(documentsGlob, schema);
47
+ const invalid: InvalidDocument[] = validate(documentsGlob, schema)
46
48
  // similar
47
- const similar: SimilarMap = similar(schema, typename, threshold);
49
+ const similar: SimilarMap = similar(schema, typename, threshold)
48
50
  // coverage
49
- const schemaCoverage: SchemaCoverage = coverage(schema, documents);
51
+ const schemaCoverage: SchemaCoverage = coverage(schema, documents)
50
52
  // ...
51
53
  ```
52
54
 
@@ -2,3 +2,4 @@ export * from './dangerous-breaking';
2
2
  export * from './suppress-removal-of-deprecated-field';
3
3
  export * from './ignore-description-changes';
4
4
  export * from './consider-usage';
5
+ export * from './safe-unreachable';
@@ -0,0 +1,2 @@
1
+ import { Rule } from './types';
2
+ export declare const safeUnreachable: Rule;
package/index.d.ts CHANGED
@@ -2,6 +2,10 @@ export { diff, DiffRule, Rule, CompletionArgs, CompletionHandler, UsageHandler }
2
2
  export { validate, InvalidDocument } from './validate';
3
3
  export { similar, SimilarMap } from './similar';
4
4
  export * from './coverage';
5
- export { Change, CriticalityLevel, Criticality, ChangeType, } from './diff/changes/change';
5
+ export { Change, CriticalityLevel, Criticality, ChangeType } from './diff/changes/change';
6
6
  export { getTypePrefix } from './utils/graphql';
7
7
  export { Target, Rating, BestMatch } from './utils/string';
8
+ export { countAliases } from './validate/alias-count';
9
+ export { countDirectives } from './validate/directive-count';
10
+ export { countDepth } from './validate/query-depth';
11
+ export { calculateOperationComplexity, CalculateOperationComplexityConfig } from './validate/complexity';