Sha256: 9601f05e18186a34e742fa43f6fb3621154eefdf32cc8a5340d341f3930c2037
Contents?: true
Size: 526 Bytes
Versions: 13
Compression:
Stored size: 526 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
13 entries across 13 versions & 1 rubygems