Created
May 22, 2019 01:42
-
-
Save BerndWessels/7f71d4b2076467319979bef846ac454d to your computer and use it in GitHub Desktop.
BFF pulumi medium 2
This file contains 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 strict"; | |
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
// node dependencies | |
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
const fs = require('fs'); | |
const glob = require('glob'); | |
const path = require('path'); | |
// Add the ability to read .graphql files as strings. | |
require.extensions['.graphql'] = function (module, filename) { | |
module.exports = fs.readFileSync(filename, 'utf8'); | |
}; | |
// Pulumi dependencies | |
const pulumi = require("@pulumi/pulumi"); | |
const aws = require("@pulumi/aws"); | |
const awsx = require("@pulumi/awsx"); | |
// Read the GraphQL Schema as a string. | |
const graphQLSchema = require('./schema.graphql'); | |
// Regular Expression helper function | |
const findMatches = (regex, str, matches = []) => { | |
const res = regex.exec(str); | |
res && matches.push(res[1]) && findMatches(regex, str, matches); | |
return matches; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment