Ok so I got to the bottom of this and I'm pretty sure this is a bug. So this happens when you are using a document that does not have a slice zone with slice machine. For instance my events, posts, and product pages are not slice zone enabled but I was happily using the lifecycle hooks just like the slice zone documentation. My events and posts were working fine but this is because there is a "body" parameter that defaults to body which was one of the keys in my document data.
For products this was not the case and so of course this failure was driving me nuts until I saw the "body" key in the documentation. I instead just set this to the description key and all was working well.
export const getStaticProps = useGetStaticProps({
client: Client(),
type: 'product',
body: 'description',
uid: ({ params }) => params.uid
})
This is rather unexpected and I'm pretty sure this is a hack. Albeit I think it's rather nice to be able to use these hooks for pages without slice zone but this is extremely unexpected behavior and I would have realized this folly sooner had I not coincidentally made a "body" field in my events and posts documents.
Anyway hoping to help someone else that hits this but it would also be great to know if this is intentional or going to be patched over.