I am trying to figure out what you are thanking him for . . . attending your party? I am no Martha Stuart, but I don't think that a thank you would be necessary. Usually a thank you is for a present or a special favor. Attending a graduation party, eating, and drinking doesn't merit a thank you in my book.
But . . . if you want to thank him, you could always write something like, "Thank you for being at my graduation party and sharing in my special day. It was wonderful to see you. Wishing you the best."
Eric Noto