Replies: 1 comment
-
|
It seams, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm currently experimenting with payload to gauge its fit for an upcoming project.
I was mocking a few collections (and globals) and wanted to use the local API to fetch all most recent drafts of all documents within a collection.
During testing I stumbled upon a few unexpected things.
So I ended up with the following:
My questions are:
Why does the property
latestnot appear (as optional) in the typeTypeWithVersion<...>when it is returned here?Why do the documents returned by
findVersionnot include theidfield within the version object despite their type?To work around this, I'm manually adding the "id" field from "parent" to the returned version object.
Is this intended behavior? If so, isn't the type of the "version" object just wrong?
For reference:
Beta Was this translation helpful? Give feedback.
All reactions