Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@guyromellemagayano/gatsby-source-bigcommerce
Advanced tools
Readme
This source plugin makes BigCommerce API data available in GatsbyJS sites.
v2
and v3
BigCommerce API versionsFor npm
:
npm install @guyromellemagayano/gatsby-source-bigcommerce
For yarn
:
yarn add @guyromellemagayano/gatsby-source-bigcommerce
Setup this plugin in gatsby-config.js
as follows:
module.exports = {
plugins: [
{
resolve: "@guyromellemagayano/gatsby-source-bigcommerce",
options: {
clientId: process.env.BIGCOMMERCE_API_CLIENT_ID,
secret: process.env.BIGCOMMERCE_API_SECRET,
accessToken: process.env.BIGCOMMERCE_API_ACCESS_TOKEN,
storeHash: process.env.BIGCOMMERCE_API_STORE_HASH,
endpoints: {
BigCommerceProducts: "/v3/catalog/products?include=images,variants,custom_fields,options,modifiers,videos",
BigCommerceCategories: "/v3/catalog/categories",
BigCommerceCategoriesTree: "/v3/catalog/categories/tree",
BigCommerceBrands: "/v3/catalog/brands"
}
}
}
]
};
Add a single or multiple endpoints
. You can find a list of endpoints here.
options: {
...
// Required fields
clientId: process.env.BIGCOMMERCE_API_CLIENT_ID,
secret: process.env.BIGCOMMERCE_API_SECRET,
accessToken: process.env.BIGCOMMERCE_API_ACCESS_TOKEN,
storeHash: process.env.BIGCOMMERCE_API_STORE_HASH,
// Create a node name and map it to a valid `bigcommerce` endpoint
endpoints: {
BigCommerceProducts: "/v3/catalog/products?include=images,variants,custom_fields,options,modifiers,videos",
BigCommerceCategories: "/v3/catalog/categories",
BigCommerceCategoriesTree: "/v3/catalog/categories/tree",
BigCommerceBrands: "/v3/catalog/brands"
}
}
Assuming you correctly setup the plugin in gatsby-config.js
and you have a BigCommerceProducts
node name and its valid endpoint:
endpoints: {
BigCommerceProducts: "/v3/catalog/products?include=images,variants,custom_fields,options,modifiers,videos";
}
you can query the data as follows:
{
allBigCommerceProducts {
nodes {
name
price
id
sku
variants {
id
product_id
price
cost_price
image_url
sku
}
reviews_count
reviews_rating_sum
page_title
images {
id
description
product_id
date_modified
}
bigcommerce_id
brand_id
custom_url {
url
}
categories
availability
}
totalCount
}
}
localhost:8000/__graphql
, assuming you already run your gatsby
site.preview
mode support (Netlify, Vercel, Gatsby Cloud, etc.)Released under the MIT license.
Thanks to all the contributors of the original plugin gatsby-source-bigcommerce for the great work. 🎉
FAQs
This official source plugin makes BigCommerce API data available in GatsbyJS sites. Currently in active development.
We found that @guyromellemagayano/gatsby-source-bigcommerce demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.