diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-01-30 12:41:01 -0500 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-01-30 12:41:01 -0500 |
| commit | cd0b07b3adb36fb5ec098f9e511ab45d774fee7b (patch) | |
| tree | a203e5010219ccea1acc6bbd2c0a4bcfa0a78615 /graphcool/src/getPrice.js | |
| parent | 0a1648bf47490b312169c531aeb51ef4725e8d2e (diff) | |
Move to Prisma Backend
Diffstat (limited to 'graphcool/src/getPrice.js')
| -rw-r--r-- | graphcool/src/getPrice.js | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/graphcool/src/getPrice.js b/graphcool/src/getPrice.js deleted file mode 100644 index 7808a85..0000000 --- a/graphcool/src/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) -} |
