shopify-collection-fetcher
This library returns all products or ids from a Shopify collection using the GraphQL endpoint. It automatically handles pagination.
Usage:
Inside of your project, do:
yarn add @originalfunko/shopify-collection-fetcher
Simply include the library:
const shopifyCollectionFetcher = ;
Initialize your config settings:
shopifyCollectionFetcher;
Then call it as needed:
let productsResult = await shopifyCollectionFetcher;let productIds = await shopifyCollectionFetcher;products = products;
Configuration:
Beyond the SHOPIFY_API_URI
and SHOPIFY_API_TOKEN
settings (which will inherit process.env.SHOPIFY_API_URI
and process.env.SHOPIFY_API_TOKEN
if available), here is the complete list of settings:
shopifyCollectionFetcher;