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



835
836
837
838
839
# File 'lib/graphql/schema_comparator/changes.rb', line 835

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.



833
834
835
# File 'lib/graphql/schema_comparator/changes.rb', line 833

def criticality
  @criticality
end

#directiveObject (readonly)

Returns the value of attribute directive.



833
834
835
# File 'lib/graphql/schema_comparator/changes.rb', line 833

def directive
  @directive
end

#locationObject (readonly)

Returns the value of attribute location.



833
834
835
# File 'lib/graphql/schema_comparator/changes.rb', line 833

def location
  @location
end

Instance Method Details

#messageObject



841
842
843
# File 'lib/graphql/schema_comparator/changes.rb', line 841

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

#pathObject



845
846
847
# File 'lib/graphql/schema_comparator/changes.rb', line 845

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