summaryrefslogtreecommitdiffstats
path: root/graphcool/src/hello.js
diff options
context:
space:
mode:
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