Skip to content

feat: introduce omit, extend, and safeExtend methods to CoMapSchema#3497

Merged
gdorsi merged 2 commits intogarden-co:mainfrom
Gabrola:comap-extend
Mar 23, 2026
Merged

feat: introduce omit, extend, and safeExtend methods to CoMapSchema#3497
gdorsi merged 2 commits intogarden-co:mainfrom
Gabrola:comap-extend

Conversation

@Gabrola
Copy link
Copy Markdown
Contributor

@Gabrola Gabrola commented Mar 13, 2026

I've refactored the existing partial() and pick() methods to use the existing private copy() method and added some options to make sure they function exactly the same as before, which is not inheriting migrations, permissions, resolveQuery, and catchall for pick().

In my opinion though, all these derived schemas should inherit permissions, and partial() should also technically be able to inherit the resolveQuery just based on the average user's expectation of behavior if they chain calls like this schema.withPermissions(...).partial().

I didn't want to introduce any behavioral changes to existing methods — especially inheriting permissions, this could potentially be a breaking change for some users, but I think making partial() inherit resolveQuery should be mostly fine though.

Closes #2288

@assert-app
Copy link
Copy Markdown

assert-app bot commented Mar 13, 2026

@cursor
Copy link
Copy Markdown

cursor bot commented Mar 13, 2026

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 13, 2026

@Gabrola is attempting to deploy a commit to the Garden Computing Team on Vercel.

A member of the Team first needs to authorize it.

@gdorsi gdorsi merged commit 6f53b96 into garden-co:main Mar 23, 2026
12 of 36 checks passed
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.

Allow extending a schema, preserving helpers

2 participants