summaryrefslogtreecommitdiffstats
path: root/graphcool/src/hello.js
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2017-10-27 13:24:41 -0400
committerWes Bos <wesbos@gmail.com>2017-10-27 13:24:41 -0400
commit0f1b9240bbd05b377e868faf78b89b509a3d7537 (patch)
tree1974b4d5a59f1843f64789b5536c32606a097ba0 /graphcool/src/hello.js
parentacdfa2840f867e686471a8e9ac3f29353fab7dd1 (diff)
ayeee
Diffstat (limited to 'graphcool/src/hello.js')
-rw-r--r--graphcool/src/hello.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/graphcool/src/hello.js b/graphcool/src/hello.js
new file mode 100644
index 0000000..0e3e7ba
--- /dev/null
+++ b/graphcool/src/hello.js
@@ -0,0 +1,11 @@
+export default async event => {
+ // you can use ES7 with async/await and even TypeScript in your functions :)
+
+ await new Promise(r => setTimeout(r, 50))
+
+ return {
+ data: {
+ message: `Hello ${event.data.name || 'World'}`
+ }
+ }
+} \ No newline at end of file