Preheat your oven to 350° F. Grease a casserole dish with spray and set it aside.
In a large pan, melt half the butter and fry the onion and the squash with the thyme and a pinch of salt and pepper. Sautee for 2-3 minutes, stirring. Take it off the heat and allow it to cool.
Add half the grated cheddar cheese, sour cream, mayonnaise, eggs, and a pinch of salt and pepper to a large bowl, and whisk well to combine.
Mix the cooked zucchini and onion into the sour cream mixture until it is coated all over.