Shopify / mobile-buy-sdk-ios

Shopify’s Mobile Buy SDK makes it simple to sell physical products inside your mobile app. With a few lines of code, you can connect your app with the Shopify platform and let your users buy your products using Apple Pay or their credit card.
MIT License
452 stars 199 forks source link

"Fatal error: field node wasn't queried" when trying to search products based on title #1134

Open userSV opened 3 years ago

userSV commented 3 years ago

I am not able to search the products in the store, i know that searching within collection is not yet feasible, but my query crashes.

Below is my query to search products based on the 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

            .fragmentForStandardProduct()

        }

    }

}`

It crashes with "Fatal error: field node wasn't queried" in GraphQL.swift file in MobileBuySDK pods. During debugging i get to know that the app crashes when i try to get the query.node. I have attached the screenshot for reference.

Screenshot 2021-01-06 at 6 52 45 PM

Can anyone help me like what is the issue here or how can i search products based on some text.