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

HG-3697: Use GraphQL API for Products Stream #28

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

nassredean
Copy link

@nassredean nassredean commented Jan 17, 2025

Description of change

This pull request changes the implementation of the "Products" stream to use the Shopify GraphQL API. It ensures compatibility with our existing stream schema by leveraging a ProductCompatibility class that handles casting fields and values from the new API to their corresponding equivalent on the legacy API. To support this change, a bump to the ShopifyAPI client was required. A small change was also made to the __init__.py entrypoint in order to support different Shopify sessions per stream.

QA steps

  • automated tests passing
  • manual qa steps passing (list below)

Risks

Rollback steps

  • revert this branch

with open(value_map_path, 'r') as file:
self.value_map = json.load(file)

def metafields(self, _options=None, **kwargs):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added to support the metafields stream, which calls this method here.

Unfortunately, it seems that the request shopify.resources.Metafield.find issues looks like this:

https://hotglue-testing-1.myshopify.com/admin/api/2024-01/products/7903137038556/metafields.json?limit=175&since_id=1

Which calls the /products endpoint. Looking into how to resolve this.

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

Successfully merging this pull request may close these issues.

1 participant