Error getting started - "Cannot read properties of undefined (reading 'method')"

Hello,

I’m somewhat new to this and am looking for some guidance. I have a very basic setup however am getting an error ‘Cannot read properties of undefined (reading ‘method’)’.

This is my setup.

import { ApolloServer } from '@apollo/server';

import { startServerAndCreateLambdaHandler, handlers } from '@as-integrations/aws-lambda';

const typeDefs = `#graphql
  type Query {
    test: String
  }
`;
const resolvers = {
  Query: {
    test: () => 'Hello World!',
  },
};

const server = new ApolloServer({
  typeDefs,
  resolvers,
});

export const graphqlHandler = startServerAndCreateLambdaHandler(
  server,
  handlers.createAPIGatewayProxyEventV2RequestHandler(),
);

However if I change handlers.createAPIGatewayProxyEventV2RequestHandler() to handlers.createAPIGatewayProxyEventRequestHandler() it works just fine. Any pointers?