class GraphQL::SchemaComparator::Changes::InputFieldAdded
Mostly Non-Breaking Changes
Attributes
criticality[R]
field[R]
input_object_type[R]
Public Class Methods
new(input_object_type, field)
click to toggle source
# File lib/graphql/schema_comparator/changes.rb, line 581 def initialize(input_object_type, field) @criticality = if field.type.non_null? Changes::Criticality.breaking(reason: "Adding a non-null field to an existing input type will cause existing queries that use this input type to error because they will not provide a value for this new field.") else Changes::Criticality.non_breaking end @input_object_type = input_object_type @field = field end
Public Instance Methods
message()
click to toggle source
# File lib/graphql/schema_comparator/changes.rb, line 592 def message "Input field `#{field.graphql_name}` was added to input object type `#{input_object_type.graphql_definition}`" end
path()
click to toggle source
# File lib/graphql/schema_comparator/changes.rb, line 596 def path [input_object_type.graphql_definition, field.graphql_name].join(".") end