class GraphQL::SchemaComparator::Changes::FieldArgumentAdded
Attributes
argument[R]
criticality[R]
field[R]
type[R]
Public Class Methods
new(type, field, argument)
click to toggle source
# File lib/graphql/schema_comparator/changes.rb, line 604 def initialize(type, field, argument) @criticality = if argument.type.non_null? Changes::Criticality.breaking(reason: "Adding a required argument to an existing field is a breaking change because it will cause existing uses of this field to error.") else Changes::Criticality.non_breaking end @type = type @field = field @argument = argument end
Public Instance Methods
message()
click to toggle source
# File lib/graphql/schema_comparator/changes.rb, line 616 def message "Argument `#{argument.graphql_name}: #{argument.type.graphql_definition}` added to field `#{type.graphql_definition}.#{field.graphql_name}`" end
path()
click to toggle source
# File lib/graphql/schema_comparator/changes.rb, line 620 def path [type.graphql_definition, field.graphql_name, argument.graphql_name].join(".") end