What the Gantt draws
Each issue with a start and a due date becomes a bar. Milestones sit on the same axis. Progress fills the bar. Finish-to-start dependencies are drawn as arrows between bars.
The edge set is resolved per project by the API, so the chart draws one query's answer rather than walking the graph in the browser.
Dependencies are checked
A dependency that would create a cycle is rejected. That matters more than it sounds: a cycle in a schedule graph is not a drawing problem, it is a plan that cannot be executed in any order.
A project's Gantt orders only that project's own issues. A dependency reaching outside it is recorded but does not reorder someone else's chart.