Graphql/Node js tutorial recommendations

ComDotty
New Member
1 0 0
 

I'm trying to create a small private app in Node that gets all sku and inventory quantity data from a customers Shopify store, once I have the data it will be used to create a json file to import into a Mongodb collection. The collection will provide stock data from Shopify allowing the customer to review stock levels in a seperate app, they have a number of reasons for using the data that aren't relevant here.

I know how to work with Node, Express, Mongoose and Mongo creating collections and documents, I know how to put together the framework of my little app, ultimately it will be a scheduled service hosted on Heroku, running every 2 or 3 hours to refresh the Shopify stock figures.

I've worked out that I need to use the Shopify Graphql API and run a bulk operation/query, the store holds 500 to 600 products and I want the sku and inventory quantity data for all of them, I've got a working query in Insomnia that returns the .jsonl file, the file contains the data I want.

How do I write the code to run the bulk operation in my app, and then poll the results to see when it's completed? I'm not a complete noob to software development but search as I might I can't find any tutorials or examples demonstrating how to put the Graphql elements together with the Node app!

There are plenty of videos and tutorials on how to run Graphql queries, how to get data, how to work with the Shopify bulk operations, but I can't find anything that teaches or helps me write the code!

I'm using the @Shopify/shopify-api library in Node.

Reply 1 (1)
tewe
Trailblazer
211 39 91

Hi @ComDotty ,

I wrote a littel tutorial on working with the Shopify GraphQL in Python/Jupyter Notebook see here. The syntax for the calls into the GraphQL are language independent, so maybe it is usefull for you. I see an advantage in using Juptyer Notebooks because it is very comfortable to work interactive.

If you send me a private message I can help you with the calls you need.

Regards
Thomas

• Was my reply helpful? Click Like to let me know!
• Was your question answered? Mark it as an Accepted Solution
• Check out our Price Updater App