Added mutations and queries for DaiailyStats and TotalStats. Updated Schema. Added scalar package.

This commit is contained in:
2025-11-11 20:17:14 -05:00
parent ff334a7f0d
commit 834900f9bb
25 changed files with 2483 additions and 4532 deletions

View File

@@ -1,23 +1,28 @@
"use client";
import { Provider } from "@/components/ui/provider";
import { UrqlProvider, ssrExchange, cacheExchange, fetchExchange, createClient } from '@urql/next';
import { useMemo } from "react";
import {
UrqlProvider,
ssrExchange,
cacheExchange,
fetchExchange,
createClient
} from "@urql/next";
import React, { useMemo } from "react";
export default function RootLayout({
children
}: Readonly<{
children: React.ReactNode;
}>) {
const [client, ssr] = useMemo(() => {
const ssr = ssrExchange({
isClient: typeof window !== 'undefined',
isClient: typeof window !== "undefined"
});
const client = createClient({
url: process.env.NEXT_PUBLIC_GRAPHQL_URL || "",
exchanges: [cacheExchange, ssr, fetchExchange],
suspense: true,
suspense: true
});
return [client, ssr];