Class: GraphQL::StaticValidation::FragmentsAreOnCompositeTypes
- Inherits:
-
Object
- Object
- GraphQL::StaticValidation::FragmentsAreOnCompositeTypes
- Includes:
- Message::MessageHelper
- Defined in:
- lib/graph_ql/static_validation/rules/fragments_are_on_composite_types.rb
Constant Summary collapse
- HAS_TYPE_CONDITION =
[ GraphQL::Nodes::FragmentDefinition, GraphQL::Nodes::InlineFragment, ]
Instance Method Summary collapse
Methods included from Message::MessageHelper
Instance Method Details
#validate(context) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/graph_ql/static_validation/rules/fragments_are_on_composite_types.rb', line 9 def validate(context) HAS_TYPE_CONDITION.each do |node_class| context.visitor[node_class] << -> (node, parent) { validate_type_is_composite(node, context) } end end |