In traditional blockchains consensus is maintained by proof of work such that the valid chain containing the most cumulative work is agreed to be the consensus chain.
IOTA lacks blocks and transactions are appended to the tangle (approximately) individually.
How do nodes agree on which transactions are canonical if two conflicting transactions are appended relatively synchronously?
If an entity builds a graph which contains an invalid transaction before anchoring it to the main tangle is the entire graph invalid?