Dear Shopify / community,
I am building an app that allows users to analyze their store performance. For this we let the app query the Graphql API and I seem to have run into a potential bug as it only seems to happen on the customers' object.
I would like to only return customers that were created in 2019 using the below request. However, the response returns all of my customers. When I perform a similar request for orders or products then the filtering does work as expected.
Request to /admin/api/2019-10/graphql.json
Content of query
{ customers(first: 250, query:"created_at:>2019-01-01") { edges { cursor node { acceptsMarketing acceptsMarketingUpdatedAt averageOrderAmount canDelete createdAt displayName email firstName hasNote hasTimelineComment id lastName legacyResourceId lifetimeDuration marketingOptInLevel note ordersCount phone state tags taxExempt totalSpent updatedAt validEmailAddress verifiedEmail } } pageInfo { hasNextPage } }}
Am I doing something wrong or is this a bug?
Solved! Go to the solution
Success.
Hi @mverstrepen
created_at is not currently a queryable field for Customers. Here is the list: https://help.shopify.com/en/api/graphql-admin-api/reference/queryroot#customers-2019-10you should be able to use customer_date
, which is an alias to created_at in this case.
Vix | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution
Subject | Author | Posted |
---|---|---|
an hour ago | ||
an hour ago | ||
2 hours ago | ||
4 hours ago | ||
7 hours ago |
User | Count |
---|---|
259 | |
165 | |
137 | |
67 | |
39 |