var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var graphql_exports = {};
__export(graphql_exports, {
  __rw_graphqlOptions: () => __rw_graphqlOptions,
  handler: () => handler
});
module.exports = __toCommonJS(graphql_exports);
var import_map = __toESM(require("@babel/runtime-corejs3/core-js/map"));
var import_graphql_server = require("@cedarjs/graphql-server");
var directives_requireAuth_requireAuth = __toESM(require("../directives/requireAuth/requireAuth"));
var directives_skipAuth_skipAuth = __toESM(require("../directives/skipAuth/skipAuth"));
var sdls_config_sdl = __toESM(require("../graphql/config.sdl"));
var sdls_connectionStatus_sdl = __toESM(require("../graphql/connectionStatus.sdl"));
var sdls_dashboard_sdl = __toESM(require("../graphql/dashboard.sdl"));
var sdls_flight_sdl = __toESM(require("../graphql/flight.sdl"));
var sdls_graphiql_sdl = __toESM(require("../graphql/graphiql.sdl"));
var sdls_graphqlInspector_sdl = __toESM(require("../graphql/graphqlInspector.sdl"));
var sdls_graphqlSchema_sdl = __toESM(require("../graphql/graphqlSchema.sdl"));
var sdls_mailInbox_sdl = __toESM(require("../graphql/mailInbox.sdl"));
var sdls_mailRenderers_sdl = __toESM(require("../graphql/mailRenderers.sdl"));
var sdls_mailTemplates_sdl = __toESM(require("../graphql/mailTemplates.sdl"));
var sdls_ogTagPreview_sdl = __toESM(require("../graphql/ogTagPreview.sdl"));
var sdls_openetelemetry_sdl = __toESM(require("../graphql/openetelemetry.sdl"));
var sdls_prismaSchema_sdl = __toESM(require("../graphql/prismaSchema.sdl"));
var sdls_renderGraph_sdl = __toESM(require("../graphql/renderGraph.sdl"));
var sdls_statistics_sdl = __toESM(require("../graphql/statistics.sdl"));
var services_config_config = __toESM(require("../services/config/config"));
var services_connectionStatus_connectionStatus = __toESM(require("../services/connectionStatus/connectionStatus"));
var services_dashboard_dashboard = __toESM(require("../services/dashboard/dashboard"));
var services_flights_flights = __toESM(require("../services/flights/flights"));
var services_graphiql_graphiql = __toESM(require("../services/graphiql/graphiql"));
var services_graphqlInspector_graphqlInspector = __toESM(require("../services/graphqlInspector/graphqlInspector"));
var services_graphqlSchema_graphqlSchema = __toESM(require("../services/graphqlSchema/graphqlSchema"));
var services_mailInbox_mailInbox = __toESM(require("../services/mailInbox/mailInbox"));
var services_mailRenderers_mailRenderers = __toESM(require("../services/mailRenderers/mailRenderers"));
var services_mailTemplates_mailTemplates = __toESM(require("../services/mailTemplates/mailTemplates"));
var services_ogTagPreview_ogTagPreview = __toESM(require("../services/ogTagPreview/ogTagPreview"));
var services_opentelemetry_opentelemetry = __toESM(require("../services/opentelemetry/opentelemetry"));
var services_prismaSchema_prismaSchema = __toESM(require("../services/prismaSchema/prismaSchema"));
var services_renderGraph_renderGraph = __toESM(require("../services/renderGraph/renderGraph"));
var services_renderGraph_renderGraphRoutes = __toESM(require("../services/renderGraph/renderGraphRoutes"));
var services_statistics_statistics = __toESM(require("../services/statistics/statistics"));
var import_db = require("../lib/db");
var import_logger = require("../lib/logger");
var import_realtime = require("../lib/realtime");
var import_store = require("@cedarjs/context/dist/store");
let directives = {};
directives.requireAuth_requireAuth = directives_requireAuth_requireAuth;
directives.skipAuth_skipAuth = directives_skipAuth_skipAuth;
let sdls = {};
sdls.config_sdl = sdls_config_sdl;
sdls.connectionStatus_sdl = sdls_connectionStatus_sdl;
sdls.dashboard_sdl = sdls_dashboard_sdl;
sdls.flight_sdl = sdls_flight_sdl;
sdls.graphiql_sdl = sdls_graphiql_sdl;
sdls.graphqlInspector_sdl = sdls_graphqlInspector_sdl;
sdls.graphqlSchema_sdl = sdls_graphqlSchema_sdl;
sdls.mailInbox_sdl = sdls_mailInbox_sdl;
sdls.mailRenderers_sdl = sdls_mailRenderers_sdl;
sdls.mailTemplates_sdl = sdls_mailTemplates_sdl;
sdls.ogTagPreview_sdl = sdls_ogTagPreview_sdl;
sdls.openetelemetry_sdl = sdls_openetelemetry_sdl;
sdls.prismaSchema_sdl = sdls_prismaSchema_sdl;
sdls.renderGraph_sdl = sdls_renderGraph_sdl;
sdls.statistics_sdl = sdls_statistics_sdl;
let services = {};
services.config_config = services_config_config;
services.connectionStatus_connectionStatus = services_connectionStatus_connectionStatus;
services.dashboard_dashboard = services_dashboard_dashboard;
services.flights_flights = services_flights_flights;
services.graphiql_graphiql = services_graphiql_graphiql;
services.graphqlInspector_graphqlInspector = services_graphqlInspector_graphqlInspector;
services.graphqlSchema_graphqlSchema = services_graphqlSchema_graphqlSchema;
services.mailInbox_mailInbox = services_mailInbox_mailInbox;
services.mailRenderers_mailRenderers = services_mailRenderers_mailRenderers;
services.mailTemplates_mailTemplates = services_mailTemplates_mailTemplates;
services.ogTagPreview_ogTagPreview = services_ogTagPreview_ogTagPreview;
services.opentelemetry_opentelemetry = services_opentelemetry_opentelemetry;
services.prismaSchema_prismaSchema = services_prismaSchema_prismaSchema;
services.renderGraph_renderGraph = services_renderGraph_renderGraph;
services.renderGraph_renderGraphRoutes = services_renderGraph_renderGraphRoutes;
services.statistics_statistics = services_statistics_statistics;
const __rw_graphqlOptions = {
  loggerConfig: {
    logger: import_logger.logger
  },
  sdls,
  services,
  directives,
  allowIntrospection: true,
  allowGraphiQL: true,
  realtime: import_realtime.realtime,
  onException: () => {
    import_db.db.$disconnect();
  }
};
const __rw_handler = (0, import_graphql_server.createGraphQLHandler)(__rw_graphqlOptions);
const handler = (__rw_event, __rw__context) => {
  const __rw_contextStore = (0, import_store.getAsyncStoreInstance)().getStore();
  if (__rw_contextStore === void 0) {
    return (0, import_store.getAsyncStoreInstance)().run(new import_map.default(), __rw_handler, __rw_event, __rw__context);
  }
  return __rw_handler(__rw_event, __rw__context);
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  __rw_graphqlOptions,
  handler
});
//# sourceMappingURL=graphql.js.map
