© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
1 reply
Max52

Filter query unless filter param is null

My goal is to filter the query results to only get posts (think any social media) with a specific tag. The tag is getting send as a search param in the url, and I can filter properly when there is a search param to filter, but I want to ignore the filter if it's null.

Essentially, how can I void the
.eq("tag", null)
.eq("tag", null)
when the match case is null, that way I get all posts instead of none.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to filter is not null
SupabaseSSupabase / help-and-questions
4y ago
Query for non-null values in a nullable column
SupabaseSSupabase / help-and-questions
3y ago
Weird query param after email confirmation redirect?
SupabaseSSupabase / help-and-questions
3y ago
Google Provider not respecting redirectedFrom query param
SupabaseSSupabase / help-and-questions
4y ago