I am trying to launch an Apollo Server as a cloud function in typescript and want to use @cypher and @relationship directives in my typeDefs.
To use these directives I am using "@neo4j/graphql": "^3.0.0".
I am getting errors while providing schema to the apollo server. getSchema() returns a Promise but ApollServer expects a schema of type GraphQL Schema.
const neoSchema = new Neo4jGraphQL({ typeDefs });
const server = new ApolloServer({
schema: neoSchema.getSchema(),
context: ({ req }) => ({
headers: req.headers,
req,
}),
});
exports.handler = server.createHandler();
Would really appreciate it if someone can help me out here.