Hey
@349904487483179010the reason the type is generated like that due to
depthif you have a relationship field on a collection, query that collection with
depth=0like 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
GetServerSidePropsso can't query with depth (I don't think) - no worries, for now I'll use
const {image} = page.props as Mediawhere necessary and just update the generated file
Thanks!
you can use the depth
its a parameter
Star
Discord
online
Get dedicated engineering support directly from the Payload team.