Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Site working fine - add a vendor and now my site won't compile. Even the demo site using my creds

Solved

Site working fine - add a vendor and now my site won't compile. Even the demo site using my creds

Twilightscapes
Tourist
7 1 1

I've had my Gatsby powered site importing all products into my site using GraphQL. I am using gatsby-starter-shopify which uses gatsby-source-shopify.

Anyways, everything has been great until tonight when I tried to add a new vendor to one of my products. (previously, all products had used the same default vendor). 

Upon doing this, my site will no longer build locally, on Netlify where it is hosted. I even downloaded the theme again and added my store details and it fails on a brand new install whenever my store details are used. 

Nothing else had changed, other than me putting in a new vendor.

Now I see errors such as:

There was an error in your GraphQL query:

Cannot query field "vendor" on type "ShopifyProduct".

Cannot query field "priceRangeV2" on type "ShopifyProduct".

Cannot query field "title" on type "ShopifyProduct".

Value "tags" does not exist in "ShopifyProductFieldsEnum" enum.

Value "productType" does not exist in "ShopifyProductFieldsEnum" enum.

 

Etc..

 

Please help! I don't know what to do and my sites are now broken. 


THANKS!

 

Accepted Solution (1)
Twilightscapes
Tourist
7 1 1

This is an accepted solution.

The solution was to populate EVERY single field of at least one record, with a value. So, make sure you populate all possible things, on at least one product. Then try it. 

View solution in original post

Replies 5 (5)

Twilightscapes
Tourist
7 1 1

I am still stuck. I have tried removing the products I had altered previously and which I believe started this entire issue. 

I have tried installing a previous version of the Gatsby-shopify plugin. 

I have tried it with a default install from the theme dev github. 

All three stores I have produce the same set of errors, which is basically every field is missing... priceV2, AllShopifyProduct, shopifyCollection, etc... 

Can anyone help me please? I don't know graphql very well and I don't know how to fix this. 

 

"gatsby-source-shopify" threw an error while running the sourceNodes lifecycle:

Cannot read property 'includes' of undefined

 

 shopifyQueries = {}
 }) => {
 const client = (0, _createClient.createClient)(shopName, accessToken, apiVersion);
^
const defaultQueries = {
articles: _queries.ARTICLES_QUERY,
blogs: _queries.BLOGS_QUERY,

File: node_modules/gatsby-source-shopify/gatsby-node.js:45:49

 

zamson
Shopify Partner
7 0 0

Having the same issues when spinning up the new gatsby shopify starter for internal testing.

Cannot query field "title" on type "ShopifyProduct".
Cannot query field "priceRangeV2" on type "ShopifyProduct".
Cannot query field "vendor" on type "ShopifyProduct".

I've verified data is available in the Shopify admin.

Edit: It seems like the gatsby source plugin (5.0.1) cannot import products

zamson
Shopify Partner
7 0 0

I'm pretty new to Shopify. My products were added by an import. It seems they were not put in the Sales Channel for online store and my app. After that was completed all operations works as expected.

 

I also replaced my source plugin with gatsby-source-shopify@rc

Twilightscapes
Tourist
7 1 1

This is an accepted solution.

The solution was to populate EVERY single field of at least one record, with a value. So, make sure you populate all possible things, on at least one product. Then try it. 

brocktonpark
Visitor
1 0 0

can you expand on this more? running into the same thing.