Socket
Socket
Sign inDemoInstall

shopify-ql

Package Overview
Dependencies
6
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    shopify-ql

Shopify graphql api


Version published
Weekly downloads
6
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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";

// your shopify information, make sure to use .env or other way to hide this.
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)
// after this click shopify. and you will see all the functions available to use
// Example get the first 10 products
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";

// your shopify information, make sure to use .env or other way to hide this.
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)
// after this click shopify. and you will see all the functions available to use

// Example delete customer
const customerId='gid://shopify/Customer/1234353212'
const products = await shopify.customerDelete(customerId)

Keywords

FAQs

Last updated on 12 May 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc