Hey @Plain134 the reason the type is generated like that due to
depth
if you have a relationship field on a collection, query that collection with
depth=0
like in this post:
https://discord.com/channels/967097582721572934/1073557500751773696Here is a typeguard solution to assist you on the frontend:
https://discord.com/channels/967097582721572934/1061947681448153188Ahh, i'm using the payload package to query in next
GetServerSideProps
so can't query with depth (I don't think) - no worries, for now I'll use
const {image} = page.props as Media
where necessary and just update the generated file
Thanks!
you can use the depth
its a parameter
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.