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

[Shopify] - Feat: add shop loader and GraphQL query for shop information #1001

Merged
merged 2 commits into from
Feb 18, 2025

Conversation

yuriassuncx
Copy link
Contributor

What is this Contribution About?

Add loader to fetch store information via Shopify API

Motivation

Shopify already provides store information automatically, and fetching it directly from the API is ideal for building custom pages. This approach eliminates the need to store static data, ensuring that the information remains up to date.

What was done

  • Created a loader that queries the Shopify API and retrieves store details, including name, description, and store policies.
  • Added support for fetching specific metafields, allowing greater flexibility for customization.
  • Implemented the GetShopInfo query to retrieve relevant data and make it available in the application context.

image

Impact

This improvement makes the Shopify integration more dynamic, enabling future implementations to use store data without manual maintenance. Additionally, it enhances customization by exposing configurable metafields.

Copy link
Contributor

github-actions bot commented Feb 5, 2025

Tagging Options

Should a new tag be published when this PR is merged?

  • 👍 for Patch 0.64.27 update
  • 🎉 for Minor 0.65.0 update
  • 🚀 for Major 1.0.0 update

@IncognitaDev
Copy link
Contributor

IncognitaDev commented Feb 6, 2025

Some of this data may should be used by fields of admin, like the Privacy Policy once this is a content of the privacy policy page, keeping all content management in one place.

Anyway we can go ahead if this PR.

Can this response contain private infos of the store? if yes, you have to add the defaultVisibility export to prevent this loader of be requested directly by the url in store.

Other code changes LGTM.

@yuriassuncx
Copy link
Contributor Author

Some of this data may should be used by fields of admin, like the Privacy Policy once this is a content of the privacy policy page, keeping all content management in one place.

Anyway we can go ahead if this PR.

Can this response contain private infos of the store? if yes, you have to add the defaultVisibility export to prevent this loader of be requested directly by the url in store.

Other code changes LGTM.

thx for ur review, @IncognitaDev

the people here at Zeedog Italy need this loader more to use the new Shopify feature, which provides some automated changes with the help of AI. I added the defaultVisibility for security reasons.

Copy link
Contributor

@IncognitaDev IncognitaDev left a comment

Choose a reason for hiding this comment

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

LGTM

@matheusgr matheusgr merged commit 7d6ecee into deco-cx:main Feb 18, 2025
1 check passed
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.

3 participants