class GraphQL::SchemaComparator::Result

The result of a comparison between two schema versions

Attributes

breaking_changes[R]
changes[R]
dangerous_changes[R]
non_breaking_changes[R]

Public Class Methods

new(changes) click to toggle source
# File lib/graphql/schema_comparator/result.rb, line 7
def initialize(changes)
  @changes = changes.sort_by(&:criticality).reverse
  @breaking_changes = @changes.select(&:breaking?)
  @non_breaking_changes = @changes.select(&:non_breaking?)
  @dangerous_changes = @changes.select(&:dangerous?)
end

Public Instance Methods

breaking?() click to toggle source

If there was a breaking change between the two schema versions @return [Boolean]

# File lib/graphql/schema_comparator/result.rb, line 22
def breaking?
  breaking_changes.any?
end
identical?() click to toggle source

If the two schemas were identical @return [Boolean]

# File lib/graphql/schema_comparator/result.rb, line 16
def identical?
  @changes.empty?
end