Sha256: 35b536e4407e25e4ec58c8fc65d6feeda02ae97413daf26cc8c3c6a16e7f18f9
Contents?: true
Size: 525 Bytes
Versions: 10
Compression:
Stored size: 525 Bytes
Contents
module GraphQL module StaticValidation class FragmentsAreNamed include GraphQL::StaticValidation::Message::MessageHelper def validate(context) context.visitor[GraphQL::Language::Nodes::FragmentDefinition] << ->(node, parent) { validate_name_exists(node, context) } end private def validate_name_exists(node, context) if node.name.nil? context.errors << message("Fragment definition has no name", node, context: context) end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems