First of all, thanks a lot for the amazing work! Currently in the process of evaluating PayloadCMS as a Prismic replacement, due to self-hosting needs.
One question I had was with the typescript typings generation for blocks.
I have the same blocks present within multiple Field across collections, and while in the GraphQL output, the Blocks are typed with an explicit notation, it is not the case for the typescript ones, that instead inlines all the possibilities.
Is there a reason for that, or just an oversight?
Thanks in advance for your help!
Small bump ^^
I have a workaround that is based on creating the types myself, but it is not the most optimal workflow
As of now, the type generation looks at each collection one at a time and types it all the way through, with the exception of relationships. We've heard feedback regarding the block typing being inline instead of shared across all usages. This is definitely something that we could improve in the future - not currently in our roadmap, though.
Feel free to submit a feature request, so we can discuss/prioritize with everyone.
Will do when I have some time ^^
Done, it's available here ^^
Get help straight from the Payload team with an Enterprise License.