Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Open Source Love MIT Licence

JavaScript Examples

Setup

You'll need any recent version of Node and a NPM compatible package manager.

Install node packages

npm install

Files

utils/graphqlClient.js

This file has a common function that you can use to make an API call with LoadUp authentication

queries/scheduleRequests.js

This file uses the client to make a query, or request for data, for your current schedule requests with pagination.

mutations/createPricedScheduleRequest.js

This file uses the client to make a mutation, or a change to data, to submit a new schedule request. This will be the most common kind of order you'll make.

mutations/cancelScheduleRequest.js This file uses the client to make a mutation to cancel an existing schedule request. Note this will only work if the customer hasn't scheduled with LoadUp.

Usage

To test out one of the queries, simply execute it via node on the command line after you've replaced placeholders in the file with your values.

node queries/scheduleRequests.js