beforeyoubid/graphql-schema-diff

View on GitHub
src/types.ts

Summary

Maintainability
C
1 day
Test Coverage
A
100%

Showing 11 of 11 total issues

Similar blocks of code found in 3 locations. Consider refactoring.
Open

export const isInputValueList = (value: Maybe<InputValueDefinitionNode['type']>): value is ListTypeNode =>
notEmpty(value) && value.kind === 'ListType';
Severity: Major
Found in src/types.ts and 2 other locations - About 1 hr to fix
src/types.ts on lines 37..38
src/types.ts on lines 39..40

Similar blocks of code found in 3 locations. Consider refactoring.
Open

export const isInputValueBasicObject = (value: Maybe<InputValueDefinitionNode['type']>): value is NamedTypeNode =>
notEmpty(value) && value.kind === 'NamedType';
Severity: Major
Found in src/types.ts and 2 other locations - About 1 hr to fix
src/types.ts on lines 39..40
src/types.ts on lines 41..42

Similar blocks of code found in 3 locations. Consider refactoring.
Open

export const isInputValueNonNull = (value: Maybe<InputValueDefinitionNode['type']>): value is NonNullTypeNode =>
notEmpty(value) && value.kind === 'NonNullType';
Severity: Major
Found in src/types.ts and 2 other locations - About 1 hr to fix
src/types.ts on lines 37..38
src/types.ts on lines 41..42

Similar blocks of code found in 8 locations. Consider refactoring.
Open

export const isInputObject = (value: Maybe<DefinitionNode>): value is InputObjectTypeDefinitionNode =>
notEmpty(value) && value.kind === 'InputObjectTypeDefinition';
Severity: Major
Found in src/types.ts and 7 other locations - About 55 mins to fix
src/types.ts on lines 23..24
src/types.ts on lines 25..26
src/types.ts on lines 27..28
src/types.ts on lines 29..30
src/types.ts on lines 31..32
src/types.ts on lines 35..36
src/types.ts on lines 43..44

Similar blocks of code found in 8 locations. Consider refactoring.
Open

export const isFieldDefinition = (value: Maybe<Field>): value is FieldDefinitionNode =>
notEmpty(value) && value.kind === 'FieldDefinition';
Severity: Major
Found in src/types.ts and 7 other locations - About 55 mins to fix
src/types.ts on lines 23..24
src/types.ts on lines 25..26
src/types.ts on lines 27..28
src/types.ts on lines 29..30
src/types.ts on lines 31..32
src/types.ts on lines 33..34
src/types.ts on lines 43..44

Similar blocks of code found in 8 locations. Consider refactoring.
Open

export const isInputValueDefinition = (value: Maybe<Field>): value is InputValueDefinitionNode =>
notEmpty(value) && value.kind === 'InputValueDefinition';
Severity: Major
Found in src/types.ts and 7 other locations - About 55 mins to fix
src/types.ts on lines 25..26
src/types.ts on lines 27..28
src/types.ts on lines 29..30
src/types.ts on lines 31..32
src/types.ts on lines 33..34
src/types.ts on lines 35..36
src/types.ts on lines 43..44

Similar blocks of code found in 8 locations. Consider refactoring.
Open

export const isObjectDefinition = (value: Maybe<DefinitionNode>): value is ObjectTypeDefinitionNode =>
notEmpty(value) && value.kind === 'ObjectTypeDefinition';
Severity: Major
Found in src/types.ts and 7 other locations - About 55 mins to fix
src/types.ts on lines 23..24
src/types.ts on lines 27..28
src/types.ts on lines 29..30
src/types.ts on lines 31..32
src/types.ts on lines 33..34
src/types.ts on lines 35..36
src/types.ts on lines 43..44

Similar blocks of code found in 8 locations. Consider refactoring.
Open

export const isScalarDefinition = (value: Maybe<DefinitionNode>): value is ScalarTypeDefinitionNode =>
notEmpty(value) && value.kind === 'ScalarTypeDefinition';
Severity: Major
Found in src/types.ts and 7 other locations - About 55 mins to fix
src/types.ts on lines 23..24
src/types.ts on lines 25..26
src/types.ts on lines 27..28
src/types.ts on lines 29..30
src/types.ts on lines 31..32
src/types.ts on lines 33..34
src/types.ts on lines 35..36

Similar blocks of code found in 8 locations. Consider refactoring.
Open

export const isInterfaceDefinition = (value: Maybe<DefinitionNode>): value is InterfaceTypeDefinitionNode =>
notEmpty(value) && value.kind === 'InterfaceTypeDefinition';
Severity: Major
Found in src/types.ts and 7 other locations - About 55 mins to fix
src/types.ts on lines 23..24
src/types.ts on lines 25..26
src/types.ts on lines 27..28
src/types.ts on lines 31..32
src/types.ts on lines 33..34
src/types.ts on lines 35..36
src/types.ts on lines 43..44

Similar blocks of code found in 8 locations. Consider refactoring.
Open

export const isObjectExtension = (value: Maybe<DefinitionNode>): value is ObjectTypeExtensionNode =>
notEmpty(value) && value.kind === 'ObjectTypeExtension';
Severity: Major
Found in src/types.ts and 7 other locations - About 55 mins to fix
src/types.ts on lines 23..24
src/types.ts on lines 25..26
src/types.ts on lines 29..30
src/types.ts on lines 31..32
src/types.ts on lines 33..34
src/types.ts on lines 35..36
src/types.ts on lines 43..44

Similar blocks of code found in 8 locations. Consider refactoring.
Open

export const isOperation = (value: Maybe<DefinitionNode>): value is OperationDefinitionNode =>
notEmpty(value) && value.kind === 'OperationDefinition';
Severity: Major
Found in src/types.ts and 7 other locations - About 55 mins to fix
src/types.ts on lines 23..24
src/types.ts on lines 25..26
src/types.ts on lines 27..28
src/types.ts on lines 29..30
src/types.ts on lines 33..34
src/types.ts on lines 35..36
src/types.ts on lines 43..44

There are no issues that match your filters.

Category
Status