summaryrefslogtreecommitdiffstats
path: root/functions/getPrice.js
diff options
context:
space:
mode:
Diffstat (limited to 'functions/getPrice.js')
-rw-r--r--functions/getPrice.js26
1 files changed, 0 insertions, 26 deletions
diff --git a/functions/getPrice.js b/functions/getPrice.js
deleted file mode 100644
index 7808a85..0000000
--- a/functions/getPrice.js
+++ /dev/null
@@ -1,26 +0,0 @@
-require('isomorphic-fetch')
-
-const query = `
-query SingleItem {
- Item(id: "cj64bs7vuuqgu0116ul5cm223") {
- price
- }
-}
-`;
-
-function getItem(id) {
- return fetch('https://api.graph.cool/simple/v1/cj5xz8szs28930145gct82bdj', {
- method: 'post',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify({ query }),
- })
-}
-
-
-module.exports = function(event) {
- getItem().then(x => x.json()).then(res => {
- console.log(res.data.Item.price);
- }).catch(console.log)
-}