Shopify / mobile-buy-sdk-android

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 their credit card.
MIT License
212 stars 136 forks source link

Need to query products of a collection based on a string term #680

Open harsha-main opened 3 years ago

harsha-main commented 3 years ago

Please complete the checklist before filing an issue:

None of the above? Create an issue. Be sure to include all the necessary information for us to understand and reproduce the problem:

If there's not enough information to address the problem, we'll tag your issue with information required and close it until further information is provided.

harsha-main commented 3 years ago

I have looked at how you can search for collection based on a string term, but for the products, I don't find the query method. Here's the code that I should ideally be able to use.. if there's a query method for the args argument of the products method.

` Storefront.QueryRootQuery query1 = Storefront.query(rootQuery -> rootQuery

            .shop(shopQuery -> shopQuery
                    .collections(arg -> arg.first(10) , collectionConnectionQuery -> collectionConnectionQuery
                            .edges(collectionEdgeQuery -> collectionEdgeQuery
                                    .node(collectionQuery -> collectionQuery
                                            .title().description()  //Next line
                                            .products(arg -> arg.first(80).query("term"), productConnectionQuery -> productConnectionQuery
                                                    .edges(productEdgeQuery -> productEdgeQuery
                                                            .node(productQuery -> productQuery
                                                                    .title()
                                                                    .productType()
                                                                    .description()
                                                            )
                                                    )
                                            )
                                    )
                            )
                    )
            )
    );`

I used the following dependency along with Joda time and Timber to get the SDK imported into my app implementation "com.shopify.mobilebuysdk:buy3:3.2.3"