Messages between the defendant and his customers revealed he charged them $300 a gram for ecstasy, or up to $40 a ''cap'' (0.1g) of the drug.
He sold ketamine for $250 a gram, and offered discounts for bulk purchases of either drug.
Graham, who appeared for sentencing by Judge Russell Walker in the Queenstown District Court this week, admitted charges of supplying ecstasy and the sale of ketamine.
The defendant has been living in New Zealand on a working visa since January 2017, mostly in the resort.
Police found evidence he began selling drugs in September the following year.
Judge Walker said Graham had carried out voluntary work and taken part in a Salvation Army ''positive lifestyle'' programme since his arrest.
However, that and his expression of remorse were ''tempered somewhat by the duration of your offending''.
''This offending has become altogether too common in Queenstown.''
He was convicted on all charges and sentenced to nine months' home detention.
He must undergo intervention for addiction issues, and cannot possess or consume alcohol or non-prescribed drugs for the duration of the sentence and for six months' after the end of the sentence.
Meanwhile, a Christchurch man found with drugs in his car while celebrating New Year's Eve in Wanaka has been sentenced to community detention and supervision.
Police approached Oliver Caleb Hansen (18) while he was sitting in the driver's seat of his car in Plantation Rd on December 31 last year. Friends were in other vehicles parked nearby.
He had with him a small container, which he tried to hide from police, with a quantity of LSD, 1.33g of ecstasy, cash and a set of scales inside. He told police the drugs were for his own use.
After his arrest, Hansen denied the ecstasy charges, but changed his plea after receiving a sentence indication in June.
He admitted driving while suspended, on April 12, in Christchurch.
Appearing before Judge Walker by audio-visual link, he was convicted and sentenced on the drugs charges to 12 months' supervision and three months' community detention, at a Christchurch property.
On the driving charge, he was convicted and disqualified from driving for eight months.