Heterostructures based on layering of two-dimensional (2D) materials such as graphene and hexagonal boron nitride represent a new class of electronic devices. Realizing this potential, however, depends critically on the ability to make high-quality electrical contact. Here, we report a contact geometry in which we metalize only the 1D edge of a 2D graphene layer. In addition to outperforming conventional surface contacts, the edge-contact geometry allows a complete separation of the layer assembly and contact metallization processes. In graphene heterostructures, this enables high electronic performance, including low-temperature ballistic transport over distances longer than 15 micrometers, and room-temperature mobility comparable to the theoretical phonon-scattering limit. The edge-contact geometry provides new design possibilities for multilayered structures of complimentary 2D materials.