Sha256: a9abc3f2d592f3ba836972db98e41acc127c91b22fe9e69be503fdc271c1321b

Contents?: true

Size: 625 Bytes

Versions: 29

Compression:

Stored size: 625 Bytes

Contents

class GraphQL::Schema::FieldValidator
  def validate(field, errors)
    implementation = GraphQL::Schema::ImplementationValidator.new(field, as: "Field", errors: errors)
    implementation.must_respond_to(:name)
    implementation.must_respond_to(:type)
    implementation.must_respond_to(:description)
    implementation.must_respond_to(:arguments) do |arguments|
      validator = GraphQL::Schema::EachItemValidator.new(errors)
      validator.validate(arguments.keys, as: "#{field.name}.arguments keys", must_be: "Strings") { |k| k.is_a?(String) }
    end
    implementation.must_respond_to(:deprecation_reason)
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
graphql-0.12.1 lib/graphql/schema/field_validator.rb
graphql-0.12.0 lib/graphql/schema/field_validator.rb
graphql-0.11.1 lib/graphql/schema/field_validator.rb
graphql-0.11.0 lib/graphql/schema/field_validator.rb
graphql-0.10.9 lib/graphql/schema/field_validator.rb
graphql-0.10.8 lib/graphql/schema/field_validator.rb
graphql-0.10.7 lib/graphql/schema/field_validator.rb
graphql-0.10.6 lib/graphql/schema/field_validator.rb
graphql-0.10.5 lib/graphql/schema/field_validator.rb
graphql-0.10.4 lib/graphql/schema/field_validator.rb
graphql-0.10.3 lib/graphql/schema/field_validator.rb
graphql-0.10.2 lib/graphql/schema/field_validator.rb
graphql-0.10.1 lib/graphql/schema/field_validator.rb
graphql-0.10.0 lib/graphql/schema/field_validator.rb
graphql-0.9.5 lib/graphql/schema/field_validator.rb
graphql-0.9.4 lib/graphql/schema/field_validator.rb
graphql-0.9.3 lib/graphql/schema/field_validator.rb
graphql-0.9.2 lib/graphql/schema/field_validator.rb
graphql-0.8.1 lib/graphql/schema/field_validator.rb
graphql-0.8.0 lib/graphql/schema/field_validator.rb