Sha256: 2d55da753167a3fbf6a6ec5e0d178436ae00777b498fcfe5b38e3db2d72551f1
Contents?: true
Size: 637 Bytes
Versions: 71
Compression:
Stored size: 637 Bytes
Contents
# frozen_string_literal: true module GraphQL module StaticValidation module FragmentsAreFinite def on_document(_n, _p) super dependency_map = context.dependencies dependency_map.cyclical_definitions.each do |defn| if defn.node.is_a?(GraphQL::Language::Nodes::FragmentDefinition) context.errors << GraphQL::StaticValidation::FragmentsAreFiniteError.new( "Fragment #{defn.name} contains an infinite loop", nodes: defn.node, path: defn.path, name: defn.name ) end end end end end end
Version data entries
71 entries across 71 versions & 1 rubygems