GraphQL How to search products in the store irrespective of the collection

New Member
3 0 0

In my app, the collections and their respective products from the shopify store are being shown and there is also a search functionality in which the user can search the products. I am using the MobileBuySDK iOS and when i add the query in products then it crashes. Below is my query to filter or search products based on their title:

static func queryForSearchProducts(limit: Int, after cursor: String? = nil, productLimit: Int = 25, productCursor: String? = nil) -> Storefront.QueryRootQuery {
        return Storefront.buildQuery { $0
            .products(first: Int32(productLimit), after: productCursor, query:"title:dress") { $0

 I dont understand what is the issue here . Any help would be appreciated.