Closed silveltman closed 1 year ago
Hi @silveltman,
Thanks for the feedback!
I just updated the .env.example file to make it easier for everyone. The shopifyShop
var should be your-store.myshopify.com
.
I tried using yarn and everything works on my side.
Do you have products listed in your store? Shopify graphQL API returns null if no ressource is found.
Thanks @thomasKn !
I tried npm and pnpn too, but get the same error. The hard thing is that the error gives very little info.
I do have product in my store. In fact, I just openend a development store with test products. So now I'm thinking about it, here some updated reproduction steps:
Hope this helps! :)
@silveltman Did you try adding images to your products? I'm pretty sure the issue is related to Zod. The schema utility doesn't parse Shopify images as optional. Let me know about the images but I'll make a PR to handle products with no image anyway.
The demo store provides products including images, so I don't think that's the problem here.
@silveltman do you mind sharing your Storefront API access scopes?
Also, do you use both Public and Private access tokens in your .env
?
@silveltman I just created a new store with sample data and everything works on my side.
I also used the Shopify Headless app to create public and private tokens as follow:
By default, the headless app uses all scopes and gives every permissions.
Have you tried the latest version of the main branch?
First of all, awesome work!
for the .env file, should shopifyShop be the name or the url? So "my-shop" or "my-shop.myshopify.com"? I unfortunately get an error for both of them.
Error using name:
Error using url:
Reproduction:
Hope you can help :)