@constructive-io/graphql-server 4.31.5 → 4.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/server.js CHANGED
@@ -33,6 +33,7 @@ const request_logger_1 = require("./middleware/observability/request-logger");
33
33
  const captcha_1 = require("./middleware/captcha");
34
34
  const cookie_1 = require("./middleware/cookie");
35
35
  const upload_1 = require("./middleware/upload");
36
+ const llm_api_1 = require("./middleware/llm-api");
36
37
  const debug_sampler_1 = require("./diagnostics/debug-sampler");
37
38
  const log = new logger_1.Logger('server');
38
39
  /**
@@ -174,6 +175,9 @@ class Server {
174
175
  };
175
176
  app.use(csrfSetToken); // Set CSRF token cookie on all requests
176
177
  app.use('/graphql', csrfProtect); // Enforce CSRF on GraphQL mutations
178
+ // LLM Agent REST API — mounted before graphile so SSE streaming
179
+ // routes are handled without going through PostGraphile
180
+ app.use((0, llm_api_1.createLlmApiRouter)());
177
181
  app.use((0, graphile_1.graphile)(effectiveOpts));
178
182
  app.use(flush_1.flush);
179
183
  // Error handling - MUST be LAST