Write basic graph api code.