Get direction from edge function