@graphql-inspector/action 5.0.21 → 6.1.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/cjs/action/helpers/types.js +7 -1
- package/cjs/action/src/run.js +14 -1
- package/cjs/action/src/utils.js +12 -1
- package/cjs/core/src/diff/argument.js +5 -12
- package/cjs/core/src/diff/changes/argument.js +6 -4
- package/cjs/core/src/diff/changes/directive.js +9 -5
- package/cjs/core/src/diff/changes/field.js +3 -2
- package/cjs/core/src/diff/changes/input.js +8 -7
- package/cjs/core/src/diff/directive.js +2 -1
- package/cjs/core/src/diff/input.js +5 -11
- package/cjs/core/src/utils/graphql.js +43 -3
- package/cjs/core/src/validate/alias-count.js +5 -1
- package/cjs/core/src/validate/complexity.js +5 -1
- package/cjs/core/src/validate/directive-count.js +5 -1
- package/cjs/core/src/validate/query-depth.js +5 -1
- package/cjs/core/src/validate/token-count.js +5 -1
- package/cjs/run.js +14 -1
- package/cjs/utils.js +12 -1
- package/esm/action/helpers/types.js +6 -0
- package/esm/action/src/run.js +16 -3
- package/esm/action/src/utils.js +11 -1
- package/esm/core/src/diff/argument.js +6 -13
- package/esm/core/src/diff/changes/argument.js +7 -5
- package/esm/core/src/diff/changes/directive.js +10 -6
- package/esm/core/src/diff/changes/field.js +4 -3
- package/esm/core/src/diff/changes/input.js +9 -8
- package/esm/core/src/diff/directive.js +2 -1
- package/esm/core/src/diff/input.js +6 -12
- package/esm/core/src/utils/graphql.js +41 -4
- package/esm/core/src/validate/alias-count.js +5 -1
- package/esm/core/src/validate/complexity.js +5 -1
- package/esm/core/src/validate/directive-count.js +5 -1
- package/esm/core/src/validate/query-depth.js +5 -1
- package/esm/core/src/validate/token-count.js +5 -1
- package/esm/run.js +16 -3
- package/esm/utils.js +11 -1
- package/package.json +10 -10
- package/typings/action/helpers/types.d.cts +5 -0
- package/typings/action/helpers/types.d.ts +5 -0
- package/typings/action/src/utils.d.cts +2 -0
- package/typings/action/src/utils.d.ts +2 -0
- package/typings/core/src/diff/changes/change.d.cts +1 -1
- package/typings/core/src/diff/changes/change.d.ts +1 -1
- package/typings/core/src/diff/changes/directive.d.cts +3 -3
- package/typings/core/src/diff/changes/directive.d.ts +3 -3
- package/typings/core/src/diff/changes/type.d.cts +3 -3
- package/typings/core/src/diff/changes/type.d.ts +3 -3
- package/typings/core/src/utils/graphql.d.cts +15 -2
- package/typings/core/src/utils/graphql.d.ts +15 -2
- package/typings/utils.d.cts +2 -0
- package/typings/utils.d.ts +2 -0
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
import { DocumentNode, FieldNode, GraphQLError, GraphQLInputType, GraphQLNamedType, GraphQLOutputType, GraphQLSchema,
|
|
1
|
+
import { ConstValueNode, DocumentNode, FieldNode, GraphQLArgument, GraphQLError, GraphQLInputField, GraphQLInputType, GraphQLNamedType, GraphQLOutputType, GraphQLSchema, Kind } from 'graphql';
|
|
2
|
+
type GraphQLInputValue = (GraphQLArgument | GraphQLInputField) & {
|
|
3
|
+
default?: {
|
|
4
|
+
literal: ConstValueNode;
|
|
5
|
+
value?: never;
|
|
6
|
+
} | {
|
|
7
|
+
value: unknown;
|
|
8
|
+
literal?: never;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare function getDefaultValue(inputValue: GraphQLInputValue): unknown;
|
|
12
|
+
export declare function hasDefaultValue(inputValue: GraphQLInputValue): boolean;
|
|
13
|
+
export declare function defaultValuesAreEqual(oldInputValue: GraphQLInputValue | null | undefined, newInputValue: GraphQLInputValue): boolean;
|
|
2
14
|
export declare function safeChangeForField(oldType: GraphQLOutputType, newType: GraphQLOutputType): boolean;
|
|
3
15
|
export declare function safeChangeForInputValue(oldType: GraphQLInputType, newType: GraphQLInputType): boolean;
|
|
4
|
-
export declare function getKind(type: GraphQLNamedType):
|
|
16
|
+
export declare function getKind(type: GraphQLNamedType): Kind;
|
|
5
17
|
export declare function getTypePrefix(type: GraphQLNamedType): string;
|
|
6
18
|
export declare function isPrimitive(type: GraphQLNamedType | string): boolean;
|
|
7
19
|
export declare function isForIntrospection(type: GraphQLNamedType | string): boolean;
|
|
@@ -9,3 +21,4 @@ export declare function findDeprecatedUsages(schema: GraphQLSchema, ast: Documen
|
|
|
9
21
|
export declare function removeFieldIfDirectives(node: FieldNode, directiveNames: string[]): FieldNode | null;
|
|
10
22
|
export declare function removeDirectives(node: FieldNode, directiveNames: string[]): FieldNode;
|
|
11
23
|
export declare function getReachableTypes(schema: GraphQLSchema): Set<string>;
|
|
24
|
+
export {};
|
package/typings/utils.d.cts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as core from '@actions/core';
|
|
2
2
|
import { Rule } from '@graphql-inspector/core';
|
|
3
|
+
import { AnnotationFilterLevel } from '../helpers/types.cjs';
|
|
3
4
|
export declare function batch<T>(items: T[], limit: number): T[][];
|
|
4
5
|
/**
|
|
5
6
|
* Treats non-falsy value as true
|
|
6
7
|
*/
|
|
7
8
|
export declare function castToBoolean(value: string | boolean, defaultValue?: boolean): boolean;
|
|
9
|
+
export declare function isAnnotationFilterLevel(value: string): value is AnnotationFilterLevel;
|
|
8
10
|
export declare function getInputAsArray(name: string, options?: core.InputOptions): string[];
|
|
9
11
|
export declare function resolveRule(name: string): Rule | undefined;
|
package/typings/utils.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as core from '@actions/core';
|
|
2
2
|
import { Rule } from '@graphql-inspector/core';
|
|
3
|
+
import { AnnotationFilterLevel } from '../helpers/types.js';
|
|
3
4
|
export declare function batch<T>(items: T[], limit: number): T[][];
|
|
4
5
|
/**
|
|
5
6
|
* Treats non-falsy value as true
|
|
6
7
|
*/
|
|
7
8
|
export declare function castToBoolean(value: string | boolean, defaultValue?: boolean): boolean;
|
|
9
|
+
export declare function isAnnotationFilterLevel(value: string): value is AnnotationFilterLevel;
|
|
8
10
|
export declare function getInputAsArray(name: string, options?: core.InputOptions): string[];
|
|
9
11
|
export declare function resolveRule(name: string): Rule | undefined;
|