Let's say I somehow am able to cast wish, be it through a scroll, a ring of three wishes, or some other DM-approved method. I then choose, instead of duplicating a spell, to imbue myself and my party members with resistance against, let's say, slashing damage.
Now, Wish states that "The stress of casting this spell to produce any effect other than duplicating another spell weakens you. After enduring that stress, each time you cast a spell until you finish a long rest, you take 1d10 necrotic damage per level of that spell."
My question, then, is: Would a cantrip still count as casting a spell and incur the 1d10 damage penalty, or would it not trigger since cantrips aren't assigned a level? Say you're a Warlock, and thus your usual go-to is the eldritch blast cantrip.