fixed env variable not working.
All checks were successful
Main / build-and-push-docker-image (20.x) (push) Successful in 5m58s

This commit is contained in:
2025-12-06 23:45:46 -05:00
parent 30546606d7
commit 465fbf96c9
8 changed files with 17 additions and 19 deletions

View File

@@ -8,6 +8,7 @@ import { config } from "#root/config.js";
import { logger } from "#root/logger.js";
import { createServer, createServerManager } from "#root/server/index.js";
import { run } from "@grammyjs/runner";
import { Client, cacheExchange, fetchExchange } from "@urql/core";
async function startPolling(config: PollingConfig) {
const bot = createBot(config.botToken, {
@@ -112,3 +113,13 @@ function onShutdown(cleanUp: () => Promise<void>) {
process.on("SIGINT", handleShutdown);
process.on("SIGTERM", handleShutdown);
}
export const urql = new Client({
url: process.env.GRAPHQL_URL || "",
exchanges: [cacheExchange, fetchExchange],
fetchOptions: {
headers: {
"x-api-key": process.env?.GRAPHQL_API_TOKEN || ""
}
}
});