A Shopify graphQl package to use the shopify graphQl api
It contains all the necessary function to make a headless e-commerce shop.
To start using the package you can import the needed solution for your project.
Import client side class
import ShopifyQl from "shopify-ql";
export const shop = {
url:"https://myShop.myshopify.com",
clientToken:"front-token-here-please",
adminToken:"admin-token-here-please"
}
const shopify = new ShopifyQl(adminKeys.shopUrl,adminKeys.clientToken)
const products = await shopify.products(10)
Import admin class, it run on server side to keep your shop safe using the node-fetch package
import {ShopifyAdminQl} from "shopify-ql/admin.js";
export const shop = {
url:"https://myShop.myshopify.com",
clientToken:"front-token-here-please",
adminToken:"admin-token-here-please"
}
const shopify = new ShopifyAdminQl(adminKeys.shopUrl,adminKeys.clientToken)
const customerId='gid://shopify/Customer/1234353212'
const products = await shopify.customerDelete(customerId)