The best way to build a modern backend + admin UI. No black magic, all TypeScript, and fully open-source, Payload is both an app framework and a headless CMS.
When i try to access a field of type relationship, it is either a number or the actual collection type. I was wondering if the number type is even needed since I always get back the actual object from the collection.
Link to reproduction
No response
Payload Version
3.0.0-beta.46
Node Version
v20.10.0
Next.js Version
15.0.0-rc.0
Describe the Bug
When i try to access a field of type relationship, it is either a number or the actual collection type. I was wondering if the number type is even needed since I always get back the actual object from the collection.
My Collection has this field in it:
When I query the collection the tags field contains tags typed as
number | Tag
even though the actual tag always is an object of this form:Reproduction Steps
Adapters and Plugins
db-postgres