fix(gatsby-source-medusa): Unsupported exports warning and schema (#1463)
**What** - Moves `sourceUpdatedNodes` and `sourceAllNodes` to a separate file, to prevent warning of unsupported exports. See #1455. - Adds warnings if `GET /store/products`, `GET /store/regions`, and `GET /store/collections` return empty arrays. This should help new users more easily figure out why their storefronts does not work as expected. - Adds schema to plugin, so that node types for products, regions and collections are always created. This will prevent errors such as `allMedusaRegions query failed` from happening in the storefront, as the query will be valid as the type exists, even if it returns nothing. This should make the gatsby plugin/starter easier to use. This error is an reoccurring issue in our discord, when new users try to run the Gatsby starter without seeding the storefront beforehand. Resolves #1455 Co-authored-by: Sebastian Rindom <7554214+srindom@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a1a5848827
commit
cbdc5b7774
5
.changeset/dull-lobsters-press.md
Normal file
5
.changeset/dull-lobsters-press.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"gatsby-source-medusa": patch
|
||||
---
|
||||
|
||||
Moves sourceUpdatedNodes and sourceAllNodes to a separate file, to prevent warning of unsupported exports.
|
||||
Reference in New Issue
Block a user