Class: GraphQL::SchemaComparator::Changes::DirectiveRemoved

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractChange

#breaking?, #dangerous?, #non_breaking?

Constructor Details

#initialize(directive) ⇒ DirectiveRemoved

Returns a new instance of DirectiveRemoved.



65
66
67
68
# File 'lib/graphql/schema_comparator/changes.rb', line 65

def initialize(directive)
  @directive = directive
  @criticality = Changes::Criticality.breaking
end

Instance Attribute Details

#criticalityObject (readonly)

Returns the value of attribute criticality.



63
64
65
# File 'lib/graphql/schema_comparator/changes.rb', line 63

def criticality
  @criticality
end

#directiveObject (readonly)

Returns the value of attribute directive.



63
64
65
# File 'lib/graphql/schema_comparator/changes.rb', line 63

def directive
  @directive
end

Instance Method Details

#messageObject



70
71
72
# File 'lib/graphql/schema_comparator/changes.rb', line 70

def message
  "Directive `#{directive.graphql_name}` was removed"
end

#pathObject



74
75
76
# File 'lib/graphql/schema_comparator/changes.rb', line 74

def path
  "@#{directive.graphql_name}"
end