python graphql term search

python graphql term search

Antonio84
Shopify Partner
50 1 3

I am trying to make a query term search with python, this is the code:

 

 

            query = """
                query($terms: String) {
                products(first:250, query:$terms) {
                    pageInfo {
                    hasNextPage
                    }
                    edges {
                    cursor
                    node {
                        id
                        handle
                        tags
                    }
                    }
                }
                }        
            """#.format(tag)
            return shopify.GraphQL().execute(query, variables={"query": terms})

 

 

I get all the products, the query doesn't filter them.

I want to find the term in all the document fields.

What's wrong?

Replies 0 (0)