Member-only story
GraphQL Multiple Search Filters and Case Insensitive Search in SwiftUI
Learn how to get around GraphQL limitations with case-insensitive search and adding multiple search filters to the query when using SwiftUI
I am pretty new to GraphQL. While I love it, I figured it is still young and there are limitations to it. In this article (exercise), we will hack our way into implementing Multiple Search Filters and Case Insensitive Search.
There are two problems we are trying to solve:
Problem 1: Multiple Where Clauses in Filters Not Allowed
Currently, you cannot filter GraphQL results with more than two “where” clause. Wouldn’t it be awesome if you could execute and manipulate result with conditional filters as below:
Select * from table-name where item1 = <item_1> and item2= <item_2>
Sadly, it is not currently possible
I researched and encountered a lot of open asks where people are trying to implement similar functionality,