<commit_before>import { GraphQLServerLambda } from 'graphql-yoga';
import { findOne, find, updateOne, connectionString } from './db';

export default ({ mongoUri, typeDefs, resolvers }) => {
  const typeDefs = schema;
  connectionString(mongoUri);

  const lambda = new GraphQLServerLambda({
    typeDefs,
    resolvers,
    options: {
      endpoint: null,
    },
  });

  return {
    server: (event, context, callback) => {
      context.callbackWaitsForEmptyEventLoop = false;
      lambda.graphqlHandler(event, context, callback);
    },
    playground: lambda.playgroundHandler,
  };
};<commit_msg>another fix<commit_after>import { GraphQLServerLambda } from 'graphql-yoga';
import { findOne, find, updateOne, connectionString } from './db';

export default ({ mongoUri, typeDefs = '', resolvers = {} }) => {
  connectionString(mongoUri);

  const lambda = new GraphQLServerLambda({
    typeDefs,
    resolvers,
    options: {
      endpoint: null,
    },
  });

  return {
    server: (event, context, callback) => {
      context.callbackWaitsForEmptyEventLoop = false;
      lambda.graphqlHandler(event, context, callback);
    },
    playground: lambda.playgroundHandler,
  };
};
{'fraction_non_alphanumeric': 0.127838519764508, 'fraction_numerical': 0.0, 'mean_word_length': 3.6850393700787403, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7363697', 'n_tokens_mistral': 365, 'n_tokens_neox': 357, 'n_words': 80}