Class: GraphQL::SchemaComparator::Changes::DirectiveLocationAdded

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, location) ⇒ DirectiveLocationAdded

Returns a new instance of DirectiveLocationAdded.



914
915
916
917
918
# File 'lib/graphql/schema_comparator/changes.rb', line 914

def initialize(directive, location)
  @criticality = Changes::Criticality.non_breaking
  @directive = directive
  @location = location
end

Instance Attribute Details

#criticalityObject (readonly)

Returns the value of attribute criticality.



912
913
914
# File 'lib/graphql/schema_comparator/changes.rb', line 912

def criticality
  @criticality
end

#directiveObject (readonly)

Returns the value of attribute directive.



912
913
914
# File 'lib/graphql/schema_comparator/changes.rb', line 912

def directive
  @directive
end

#locationObject (readonly)

Returns the value of attribute location.



912
913
914
# File 'lib/graphql/schema_comparator/changes.rb', line 912

def location
  @location
end

Instance Method Details

#messageObject



920
921
922
# File 'lib/graphql/schema_comparator/changes.rb', line 920

def message
  "Location `#{location}` was added to directive `#{directive.graphql_name}`"
end

#pathObject



924
925
926
# File 'lib/graphql/schema_comparator/changes.rb', line 924

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