I'd like to query the customer based on his first_order_created_at

Highlighted
New Member
2 0 0

hi there:

I ran into a problem in the restful transformation graphql. The requirement is to query the customer for a specified time period and create a time filter based on the customer's first order.

python restful query:

self.wrappers['shopify'].customers_collection.find({
            'first_order_created_at': {
                "$gte": start_date.astimezone(pytz.utc),
                "$lte": end_date.astimezone(pytz.utc)
            }
        })

Now I want to use the graphql query, but there's no first_order_created_at field in the graphql-customers collection. With only the orders field in the customers collection, how do I filter customers based on the creation time of the first order?

thanks.

0 Likes
New Member
2 0 0

I have the answer. Thank you

0 Likes