Skip to content

G-bot987/cake

Repository files navigation

Cake Digital Developer Tec Test

Steps to run locally

Running scriptss

complie with tsc, e.g. tsc script1.ts then run with compiled js file e.g. node script1.js

Script 1

  • calculate the total avg, of order value for all orders in store
  • Calculates the total number of sales per product in the store
  • Stores the above data in a JSON file in the codes directory
  • 'line_item' has a 'product_id' that is null, sales are ignored.

Script 2

  • create/update total_sales metafield on each product found in 'salesdata.json'
  • updates metafield with total sales, quanity sold * unit price
  • uses Admin GraphQL metafieldSet mutation

Demo

DemoVideo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published