Can granite countertops be used as a desktop on a custom desk?
I wouldn't just try to attach the legs directly to the granite (or really any material used as a work surface). The result will probably be quite unstable.

I'd build a free standing frame and then fix the worktop to that.