lib/rails/graphql/request.rb
# Use the visitor to collect the operations and fragments
Use the visitor to collect the operations and fragments
Use the visitor to collect the operations and fragments
def collect_definitions!
          visitor.collect_definitions(@document) do |kind, node, data|
            case kind
            when :operation
              operations[data[:name]] = Component::Operation.build(self, node, data)
            when :fragment
              fragments[data[:name]] = build(Component::Fragment, self, node, data)
            end
          end
        end
def collect_definitions! visitor . collect_definitions ( @document ) do | kind , node , data | case kind when :operation operations [ data [ :name ] ] = Component :: Operation . build ( self , node , data ) when :fragment fragments [ data [ :name ] ] = build ( Component :: Fragment , self , node , data ) end end end
Use the visitor to collect the operations and fragments
Use the visitor to collect the operations and fragments