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
const lambdaPlayground = require('graphql-playground-middleware-lambda'); | |
const { ENDPOINT_URL = '' } = process.env; | |
module.exports.handler = lambdaPlayground({ | |
endpoint: ENDPOINT_URL, | |
}); |
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
const { graphqlLambda } = require('apollo-server-lambda/dist/lambdaApollo'); | |
const gql = require('graphql-tag'); | |
exports.handler = graphqlLambda({ | |
// our schema | |
typeDefs: gql``, | |
// our resolvers | |
resolver: {}, | |
}); |
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
const S3 = require('aws-sdk/clients/s3'); | |
const s3 = new S3(); | |
module.exports.handler = async (ev) => { | |
// ... | |
}; |
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
const { name: service } = require('./package.json'); | |
const { INDIVIDUALLY = '0', NCC = '0' } = process.env; | |
const IS_INDIVIDUALLY = Boolean(JSON.parse(INDIVIDUALLY)); | |
const IS_NCC = Boolean(JSON.parse(NCC)); | |
module.exports = { | |
service, | |
plugins: [IS_NCC && 'serverless-plugin-ncc'].filter(Boolean), | |
provider: { |