Class: GraphQL::SchemaComparator::Changes::AbstractChange

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/schema_comparator/changes.rb

Overview

Base class for change objects

Direct Known Subclasses

DirectiveAdded, DirectiveArgumentAdded, DirectiveArgumentAstDirectiveAdded, DirectiveArgumentAstDirectiveRemoved, DirectiveArgumentDefaultChanged, DirectiveArgumentDescriptionChanged, DirectiveArgumentRemoved, DirectiveArgumentTypeChanged, DirectiveDescriptionChanged, DirectiveLocationAdded, DirectiveLocationRemoved, DirectiveRemoved, EnumTypeAstDirectiveAdded, EnumTypeAstDirectiveRemoved, EnumValueAdded, EnumValueAstDirectiveAdded, EnumValueAstDirectiveRemoved, EnumValueDeprecated, EnumValueDescriptionChanged, EnumValueRemoved, FieldAdded, FieldArgumentAdded, FieldArgumentAstDirectiveAdded, FieldArgumentAstDirectiveRemoved, FieldArgumentDefaultChanged, FieldArgumentDescriptionChanged, FieldArgumentRemoved, FieldArgumentTypeChanged, FieldAstDirectiveAdded, FieldAstDirectiveRemoved, FieldDeprecationChanged, FieldDescriptionChanged, FieldRemoved, FieldTypeChanged, InputFieldAdded, InputFieldAstDirectiveAdded, InputFieldAstDirectiveRemoved, InputFieldDefaultChanged, InputFieldDescriptionChanged, InputFieldRemoved, InputFieldTypeChanged, InputObjectTypeAstDirectiveAdded, InputObjectTypeAstDirectiveRemoved, InterfaceTypeAstDirectiveAdded, InterfaceTypeAstDirectiveRemoved, ObjectTypeAstDirectiveAdded, ObjectTypeAstDirectiveRemoved, ObjectTypeInterfaceAdded, ObjectTypeInterfaceRemoved, RootOperationTypeAdded, RootOperationTypeChanged, RootOperationTypeRemoved, ScalarTypeAstDirectiveAdded, ScalarTypeAstDirectiveRemoved, SchemaAstDirectiveAdded, SchemaAstDirectiveRemoved, TypeAdded, TypeDescriptionChanged, TypeKindChanged, TypeRemoved, UnionMemberAdded, UnionMemberRemoved, UnionTypeAstDirectiveAdded, UnionTypeAstDirectiveRemoved

Instance Method Summary collapse

Instance Method Details

#breaking?Boolean

Returns If the change is breaking or not.

Returns:

  • (Boolean)

    If the change is breaking or not



16
17
18
# File 'lib/graphql/schema_comparator/changes.rb', line 16

def breaking?
  criticality.breaking?
end

#criticalityGraphQL::SchemaComparator::Changes::Criticality

Returns The criticality of this change.

Returns:

Raises:

  • (NotImplementedError)


31
32
33
# File 'lib/graphql/schema_comparator/changes.rb', line 31

def criticality
  raise NotImplementedError
end

#dangerous?Boolean

Returns If the change is dangerous or not.

Returns:

  • (Boolean)

    If the change is dangerous or not



21
22
23
# File 'lib/graphql/schema_comparator/changes.rb', line 21

def dangerous?
  criticality.dangerous?
end

#messageString

A message describing the change that happened between the two version

Returns:

  • (String)

    The change message

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/graphql/schema_comparator/changes.rb', line 11

def message
  raise NotImplementedError
end

#non_breaking?Boolean

Returns If the change is non breaking.

Returns:

  • (Boolean)

    If the change is non breaking



26
27
28
# File 'lib/graphql/schema_comparator/changes.rb', line 26

def non_breaking?
  criticality.non_breaking?
end

#pathString

Returns Dot-delimited path to the affected schema member.

Returns:

  • (String)

    Dot-delimited path to the affected schema member.

Raises:

  • (NotImplementedError)


36
37
38
# File 'lib/graphql/schema_comparator/changes.rb', line 36

def path
  raise NotImplementedError
end