What did you have for dinner?

The verb is have.
Is what a direct object, an indirect object or an adverb?

None of the above.