text: import { ApolloServer } from "apollo-server-micro";
  import Cors from "micro-cors";
  import { typeDefs } from "./schemas";
  import { resolvers } from "./resolvers";
  import { ApolloServerPluginLandingPageLocalDefault } from "apollo-server-core";
  
  export const config = {
    api: {
      bodyParser: false,
    },
  };
  
  const cors = Cors();
  
  const apolloServer = new ApolloServer({
    typeDefs,
    resolvers,
    introspection: true,
    plugins: [ApolloServerPluginLandingPageLocalDefault({ footer: false })],
  });
  
  const startServer = apolloServer.start();
  
  export default cors(async (req, res) => {
    if (req.method === "OPTIONS") {
      res.end();
      return false;
    }
  
    await startServer;
    await apolloServer.createHandler({ path: "/api/graphql" })(req, res);
  });
  