Skip to content

Conversation

@thomas-coldwell
Copy link

What?

This PR ensures the correct types are returned when using the Local API queries with draft: true passed as an option.

Why?

Support for correct types when creating a draft document was setup in #14271 ,however, the types returned when querying a document (e.g. via Local API find) with draft: true still returns incorrect types many fields marked required are possibly null but the types are non-null.

How?

This was achieved by checking for the draft option in the generics which then eventually returns the same DraftDataFromCollection type as introduced in #14271

@thomas-coldwell thomas-coldwell changed the title fix: Ensure fields are marked optional when draft: true is set for find queries fix: ensure fields are marked optional when draft: true is set for find queries Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant