Hello I’m having difficulties running pulumi up Ba...
# aws
f
Hello I’m having difficulties running pulumi up Basically this is what I’m trying to do but for AWS lambda https://www.pulumi.com/resources/getting-started-gcp-serverless-graphql/
Copy code
error: Error serializing '() => { const typeDefs = ` type Quer ...': index.js(10,16)
Copy code
const aws = require("@pulumi/aws");
const pulumi = require("@pulumi/pulumi");
const env = pulumi.getStack();

const { ApolloServer } = require("apollo-server-lambda");

const factory = () => {
  const typeDefs = `
    type Query {
      dummy: String!
    }
  `;

  const resolvers = {
    Query: {
      hello: () => "Hello world!",
    },
  };
  const server = new ApolloServer({
    typeDefs,
    resolvers,
    playground: true,
    introspection: true,
  });

  return server.createHandler();
};

module.exports = {
  route: {
    path: "/social/grapqql",
    method: "ANY",
    eventHandler: new aws.lambda.CallbackFunction(`${env}-social`, {
      callback: factory,
    }),
    apiKeyRequired: true,
  },
};