Apollo-server-lambda gets stuck when using assertSchema of neo4-graphql-js library

Hi,

we're trying to use the assertSchema function to add constraints in our Neo4j database with an apollo server running in a lambda with the library apollo-server-lambda.

Without calling this function the graphql API works perfectly. But adding this call makes the lambda throw a timeout, even if we increase the timeout limit to 60 seconds.

The code looks like:

const {
  typeDefs,
  resolvers,
  addListDependencies,
} = require("./graphql-schema");
const { ApolloServer } = require("apollo-server-lambda");
const { v1: neo4j } = require("neo4j-driver");
const { makeAugmentedSchema, assertSchema } = require("neo4j-graphql-js");
const {
  mapDefinitions,
} = require("../../node_modules/neo4j-graphql-js/dist/augment/augment.js");
const { parse } = require("graphql");
const dotenv = require("dotenv");

dotenv.config();

const parsedDefs = parse(typeDefs);
const mapped = mapDefinitions({ definitions: parsedDefs.definitions });
const typeMap = mapped[0];

const { typeDefs: newTypeDefs, resolvers: newResolvers } = addListDependencies(
  typeDefs,
  resolvers,
  typeMap
);


const augmentedSchema = makeAugmentedSchema({
  typeDefs: newTypeDefs,
  resolvers: newResolvers,
  config: {
    experimental: true,
  },
});



const driver = neo4j.driver(
  process.env.NEO4J_URI || "bolt://localhost:7687",
  neo4j.auth.basic(
    process.env.NEO4J_USER || "neo4j",
    process.env.NEO4J_PASSWORD || "neo4j"
  )
);

assertSchema({ augmentedSchema, driver, debug: true }); // this call makes the lambda throw a timeout

const server = new ApolloServer({
  context: { driver },
  schema: augmentedSchema,
});

exports.graphql = server.createHandler({
  cors: {
    origin: true,
    credentials: true,
  },
});

Before the timeout the logs show a print of the assertSchema in debug mode:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

We don't have any clue why this is happening, does anyone has an idea or at least a suggestion of where to look?

EDIT:

The version of both libraries are:
neo4j-graphql-js: 2.16.4
apollo-server-lambda: 2.18.2

Thank you in advance.