Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to fetch Products name: Buy.Graph.QueryError.invalidQuery reasons: "Field products doesn't exist on type Shop" #1212

Open
1 task
VikramSingh1994 opened this issue Aug 9, 2023 · 0 comments

Comments

@VikramSingh1994
Copy link

VikramSingh1994 commented Aug 9, 2023

Hi @cocoahero @dbart01 ,
###After 5th July, SDK released we are getting the issue on searching products by name (string)

        let query = Storefront.buildQuery { $0
            .shop {$0
                .products(first: Int32(25), query: "Zara Full shirt") { $0
                    .fragmentForStandardProduct()
                }
            }
        }

            let task  = self.client.queryGraphWith(query) { (query, error) in
            if let query = query  {
            let products = PageableArray( with: query.shop.products.edges, pageInfo:  query.shop.products.pageInfo)
                completion(products)
            } else {
                completion(nil)
            }
        }
        task.resume()
        return task

Please suggest if anyone has a solution.

Tasks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant