This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (context, req, res) { | |
res.writeHead(200, { 'Content-Type': 'text/html ' }) | |
res.end('<h1>Hello, world!</h1>') | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (context, cb) { | |
cb(null, { hello_you: context.data.name || 'Anonymous' }) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (cb) { | |
cb(null, { i_am: 'done ' }) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use latest' | |
const express = require('express') | |
const graphqlHTTP = require('express-graphql') | |
const { buildSchema } = require('graphql') | |
const app = express() | |
const webtask = require('webtask-tools') | |
const bodyParser = require('body-parser') | |
const schema = buildSchema(` | |
type Query { |