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
214 stars 137 forks source link

How do you write the collection.metafields query? #654

Open mikemilla opened 4 years ago

mikemilla commented 4 years ago
Storefront.query {
    it.collections({ args: Storefront.QueryRootQuery.CollectionsArguments -> args.first(numOfCollections) }) {
        it.edges {
            it.node {
                it.title()
                it.metafields({ // HOW DO YOU WRITE THIS TO GRAB ANYTHING }) {
                    it.edges {
                        it.node {
                            it.description()
                        }
                    }
                }
            }
        }
    }
}
mikemilla commented 4 years ago

Semi-related questions and concerns:

The readme is not only in java, but also has deprecated examples (QueryRootQuery related).

Why is the collection.metafield not in the current gradle package?

Why is StoreFront 40000+ lines long?

Some parts of the sdk are a bit confusing (ie. ArgumentDefinitions etc). There may be a more simplified syntax for much of this using more generics, and more sugar. I feel like using Standard.kt.apply may be a great fit for these queries.

Why is the admin sdk missing from this?

aaronhancock commented 4 years ago

Admin support definitely should be added!