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

first batch of task fixes #386

Merged
merged 3 commits into from
Aug 13, 2024

Conversation

tekhaus
Copy link
Collaborator

@tekhaus tekhaus commented Aug 1, 2024

Shopify suddenly deprecated most of the query filters on the customers resource.

Some issues to note with these deprecations:

  • Using one of the deprecated filters with the 2024-07 API will NOT throw an explicit GraphQL error. The invalid filter will just be ignored. The impact here is that queries will return more resources (sometimes significantly) that anticipated, and if additional logic checks are not in place in the customer processing loop, then unexpected results can occur.
  • Switching to customer segment queries is not a simple drop-in replacement for customer query filters, as the syntax is completely different. And the attributes for use in segment queries don't always align with the deprecated query filters (e.g. cannot do partial tags match with segments).
  • Compound queries (i.e. using connections in the same query, like orders) from the customer segment members resource is no longer possible, as it only supports customer metafields. As an example, previously a bulk operation that used a tag query filter to get some subset of the customers in a shop and all (or some subset) of their orders using a single query, would with the 2024-07 API now need to first query the customer segment member IDs using a segment query, and then query each customer in that dataset for their actual tags and orders data.

This PR patches the most widely used library tasks affected by these deprecations. Additional batches will be forthcoming.

@tekhaus tekhaus merged commit 7303594 into lightward:main Aug 13, 2024
2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 13, 2024
@tekhaus tekhaus deleted the refactor/customer-query-deprecations branch September 14, 2024 05:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant