docs icon indicating copy to clipboard operation
docs copied to clipboard

Add-caveat-about-OR-and-empty-values.mdx

Open andrew-walford-prisma opened this issue 2 years ago • 2 comments

Add clarification about filtering with the OR operator and empty values

andrew-walford-prisma avatar Aug 26 '22 14:08 andrew-walford-prisma

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
docs ✅ Ready (Inspect) Visit Preview Oct 24, 2022 at 0:56AM (UTC)

vercel[bot] avatar Aug 26 '22 14:08 vercel[bot]

This PR changes the following pages (Vercel Preview Deploy links):

Changed Vercel links

(Note that links will only be valid after Vercel preview deploy succeeded)

github-actions[bot] avatar Aug 26 '22 14:08 github-actions[bot]

Looking at this issue again, I've got too focussed on the notion of empty strings, which is irrelevant here - and, from a chat with @aqrln - I realize that empty strings produce expected behavior.

The issue here is with the user's error message when they tried to filter on a string[] array by passing undefined - they got an error, instead of the behavior as described in the doc. However, the doc section in question is about filter used with conditionals, and this wasn't what the user was doing. The docs section is clear about that. Therefore, this isn't a docs error, but we could maybe signpost the user's issue better in our VSCode plugin.

andrew-walford-prisma avatar Oct 26 '22 13:10 andrew-walford-prisma