Skip to content

Instantly share code, notes, and snippets.

const lambdaPlayground = require('graphql-playground-middleware-lambda');
const { ENDPOINT_URL = '' } = process.env;
module.exports.handler = lambdaPlayground({
endpoint: ENDPOINT_URL,
});
const { graphqlLambda } = require('apollo-server-lambda/dist/lambdaApollo');
const gql = require('graphql-tag');
exports.handler = graphqlLambda({
// our schema
typeDefs: gql``,
// our resolvers
resolver: {},
});
const S3 = require('aws-sdk/clients/s3');
const s3 = new S3();
module.exports.handler = async (ev) => {
// ...
};
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: {