Variables in child block

You have to do in two separated blocks. e.g:

{
ORIGIN as var(func: eq(dgraph.type, "Flow"), offset: 1, first: 1) { 
    uid
    dest_ip_node as dest_ip   # destination IP node   
 }

loop(func: uid(ORIGIN) { # Flow node    
    src_ip { # source IP node
      uid
      ~requesting_ip { # edge to DNS node
        uid
        resolved_ip @filter(uid(dest_ip_node)) { # desination IP node again
        	uid
        }
      }
    }  	
  }    
}

I have mentioned about this at Promise a nested block (under construction - I'm still working in the use case)

1 Like