gatsby-source-shopify | Source plugin for pulling product data | Ecommerce library
kandi X-RAY | gatsby-source-shopify Summary
kandi X-RAY | gatsby-source-shopify Summary
gatsby-source-shopify has been moved to the official Gatsby monorepo. Please submit PRs and issues to that repo instead. Thanks!.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gatsby-source-shopify
gatsby-source-shopify Key Features
gatsby-source-shopify Examples and Code Snippets
Community Discussions
Trending Discussions on gatsby-source-shopify
QUESTION
I'm developing a headless commerce app for a client with Gatsby and Shopify. The situation is we're having a couple of collections and inside each collection, there will be a list of products. But at the time of querying, I'm only getting the option to query allShopifyProducts. Unable to query for collections.
Gatsby Source Shopify plugin receives 2 required parameters password and storeUrl. I put the Admin API access token as a value for a password which makes the building process works with no errors. But with all that I'm unable to get the queries for Collections. Is there any way around it? I've been searching for 7 hours, but am unable to get the appropriate result
...ANSWER
Answered 2022-Mar-31 at 00:28Well, maybe if you would've spent an extra 2 minutes on your 7 hours, the collections object would've fallen into your lap.
https://shopify.dev/api/storefront/2022-01/queries/collections
Does that help you? Note there are even more endpoints to help you listed in there.
QUESTION
I am trying to create a gatsby site that uses shopify.
Following the gatsby docs here I noticed that there was no "private" apps.
According to the shopify docs here private apps have been deprecated and now they are called custom apps.
This is the part I get a bit confused. Along with this is a change in auth. Before, using the gatsby-source-shopify
plugin, I was able to add a store url and private app password into the gatsby-config
and then I could work with the shopify storefront API. But, now there is not single password with custom apps.
Because this deprecation (from shopify) happened 2 months ago it seems like Gatsby documentation needs to be updated as well as the gatsby-source-shopify
plugin.
Some general direction and help on how to get a gatsby site to authenticate (which now uses OAuth) with the shopify storefront API would be great.
...ANSWER
Answered 2022-Mar-03 at 16:39I understand this is relatively new.
To help guide others, here is what I have found.
It seems that Shopify is moving away from the Storefront Checkout API to the Storefront Cart API. One of these steps is to move from private apps to custom apps in the shopify admin. My understanding is that this is a move towards unauthenticated access to make the process easier.
And the gatsby-source-shopify plugin has not been updated to reflect this move.
I think that you could build out your own shopify service classes and connection in gatsby if you wanted. However, I would recommend NextJS to do so.
I have not found a starter template other than this one. My only hesitation with this starter is that it uses Astro. I'm not super familiar with it and I want the ability to do something more from the ground up. (I think a good starter, if someone finds one, would be one that just includes basic Gatsby or NextJS or whatever framework, and then the basic queries and services that allow you to interact with the shopify admin. Get products. Checkout. Etc...)
QUESTION
If you've ever watched Trevor Harmon's talk on Gatsby and Shopify, he does explain the integration between both.
Basically, in Shopify, all you need is
- Shopify partner account (for someone aiming to test this)
- Bogus gateway for payments
- Create new private app in Shopify. Storefront API, and select the boxes to read product tags and read customer tags.
- Create products. Options - size, color, ... Variance - combination of options.
Now, to pull data to Gatsby one needs the plugin gatsby-source-shopify and allShopifyProduct has variants with shopifyID and that's what one wants to use.
Then, for the checkout, he mentions shopify-buy plugin. Thing is, I couldn't find such plugin.
Found one with similar name called gatsby-plugin-shopify-buy but it has a slightly different name (In Gatsby plugins already noticed there's people giving similar names to some good ones as a way to get people to use them) and different methods, so that's not the one.
How should I implement the checkout then?
...ANSWER
Answered 2020-Aug-12 at 13:25Is that what you are looking for gatsby-plugin-shopify-buy
?
According to the documentation, the context
passed to the StoreContext.Consumer
or as the prop
storeContext
to withStoreContext
child components.
QUESTION
I want to display groups of Shopify products based on what collections they're associated with, using gatsby-source-shopify
Filtering to get all products from one collection as easy as running this query:
...ANSWER
Answered 2020-Aug-22 at 08:22Can you use query aliases?
QUESTION
I am using gatsby. All was working fine recently until I ran npm update
as I wanted to ensure I was up to date. Since then I am getting white pages I navigate to with this error
I believe this error is only occurring as the page is not loading and is not the root cause. I am looking to correct the root cause of the page not loading.
Looking around it seemed like this could be a service worker problem So I removed the service works as per gatsby guides but no luck.
The error only occurs when navigating to a page, for example
...ANSWER
Answered 2020-Jun-09 at 15:22Smoking Gun was a plugin I was using
"embla-carousel" "embla-carousel-react"
Rolled them back and issues went away, raising an issue on github for the team
QUESTION
So, I'm struggling to understand how Gatsby works. I'm using the https://www.gatsbyjs.org/starters/AlexanderProd/gatsby-shopify-starter/ which uses a Gatsby plugin called gatsby-source-shopify
. The plugin takes two params: shopName
and accessToken
. It looks like this in gatsby-config.js
:
ANSWER
Answered 2020-Mar-28 at 17:37As the code shows, it uses process.env.SHOP_NAME
where SHOP_NAME
is the name of the environment variable. Those files are declared at the root of the project using some naming such as .env.domain1.com
. In this file, you can store any desired variable to use it in your Gatsby configurations. When dealing with delicate variables (API keys, tokens, passwords, etc) it's recommended to use that way and ignore all .env
files in your .gitignore
.
When you trigger a command in Gatsby, you can pass it some variables, for example:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gatsby-source-shopify
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page